Page 1 of 1

Replace folder name

Posted: Fri Sep 04, 2026 11:44 am
by nigelg
Hi there

New to this and just testing some things..

I'f struggling with replace in the destination and it feels like I'm making a simple error but just can't see it

this is my situation the source is this for example

\\server\folder1\folder2\file.mov

I want the destination to be this

\\server\folderA\folder2\file.mov

so I use replace

$replace(%s_original_path%,\folder1\,\folderA\)

but I always get the specified path is invalid

what am I doing wrong?

FolderA does exist on the server

Re: Replace folder name

Posted: Fri Sep 04, 2026 4:43 pm
by FranceBB
uhm... I think you're missing the " " in $replace.

I do something fairly similar - albeit using %s_original_folder% instead - in fact I assign the variable %s_my_recursed_path% to

Code: Select all

%s_my_recursed_path% = $replace("%s_original_folder%", "\Media Ingest\Avisynth_Server1\Node1\x262_in", "")
so that when I re-encode and deliver the file I can simply use the following in the delivery node:

Code: Select all

\\mibcssda001\Media Ingest\OUTPUT Avisynth Server 1\Node1\%s_my_recursed_path%
so that it recreates the path, but ignores what was after the string I replaced with emptiness. :)