Rename output file by user variable

Questions and answers on how to get the most out of FFAStrans
Post Reply
pandadnap
Posts: 19
Joined: Thu Jul 27, 2017 7:58 am

Rename output file by user variable

Post 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
Attachments
COMM-HD_w_Rename.7z
(2.55 KiB) Downloaded 381 times
admin
Site Admin
Posts: 1669
Joined: Sat Feb 08, 2014 10:39 pm

Re: Rename output file by user variable

Post 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
pandadnap
Posts: 19
Joined: Thu Jul 27, 2017 7:58 am

Re: Rename output file by user variable

Post 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
Post Reply