Page 1 of 1

Rename output file by user variable

Posted: Tue Aug 07, 2018 10:00 am
by pandadnap
Hi Steinar,

Hope you are all good.
I am not sure if this is bug or just a function that is not being supported. I want to create a workflow that will rename the output file by taking only first 8 or 10 characters of the original filename. My logic is this.
1. create a user variable(%s_name_check%).
2. populate the variable to $left("%s_original_name%", 8) or $left("%s_original_name%", 10). For example A1234567_testfile.mp4 >> A1234567
3. In Deliveries to Folder node, Drop Original Name checked, select the user variable(%s_name_check%) in either Prefix or Suffix
The problem is the output file was renamed as %s_name_check%.mxf instead of the first 8 or 10 characters of the original filename(A1234567.mxf).
I read the help saying Prefix and Suffix support Global Variables, is user variable not supported?
I also tried to use %s_name_check% as the filename for Generate Text File. And it works fine.
Could you give me some hints?

Attached my workflow for your reference.

thanks,
Panda

Re: Rename output file by user variable

Posted: Tue Aug 07, 2018 11:50 am
by admin
Hi Panda, all good :-)

From your "Folder"-monitor you have two branches, the first going to a "Conditional" node and the second going to the "A/V Media" node. What you do is actually split the job into two different jobs. Now, in the first branch you do the population, the second job you don't. So in effect, your "%s_name_check%" variable is not populated with anything in your second branch. What you should do is connect the "A/V Media" to the "Generate text file" node. That way you make your variable available for all succeeding nodes.

Hope this helps.

-steinar

Re: Rename output file by user variable

Posted: Tue Aug 07, 2018 5:48 pm
by pandadnap
Hi Steinar,

Ah...I see. Thanks for your explanation. It helps!
I though a variable store the same value in a workflow. I don't aware branching will affect the value.

all the best,
Panda