Pick Up AQC Report PDF

Questions and answers on how to get the most out of FFAStrans
Post Reply
graham728
Posts: 82
Joined: Sat Oct 13, 2018 10:54 pm

Pick Up AQC Report PDF

Post by graham728 »

Hi,

I need some help creating the following workflow.

Our AQC software Vidchecker generates PDF reports for AS-11 files. I'd like to create a node that deletes the first eight characters of the file name and the last 31 characters from the end.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Pick Up AQC Report PDF

Post by emcodem »

Hehe, well i guess vidchecker thinks of itself that it is too expensive to do "simple" stuff ;-)

In a populate variables processor, create a string variable named something like "s_outputfile" and set the value to this:

Code: Select all

$replace("%s_original_name%.%s_original_ext%","%s_original_name%", $triml($trimr("%s_original_name%",31),8),0)
After that, use a command executor node with something like this:

Code: Select all

cmd /c "rename "%s_source%" "%s_outputfile%""
In case the workflow goes on, do not forget to check "Set "%s_source%"..." in the command line processor and set it to this value

Code: Select all

%s_original_folder%\%s_outputfile%
Cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
graham728
Posts: 82
Joined: Sat Oct 13, 2018 10:54 pm

Re: Pick Up AQC Report PDF

Post by graham728 »

Hi,

I've tried to do this but it's creating an '%s_outputfile%' file in the same folder as the AQC report and the workflow fails saying it can't find the specified output path. The path is available to the workflow.

Ive attached the workflow, it's the bottom 4 nodes that are the AQC PDF workflow.

Thanks.
Last edited by graham728 on Sat Feb 02, 2019 8:25 pm, edited 1 time in total.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Pick Up AQC Report PDF

Post by emcodem »

Impressive workflow, i wonder how it come you have troubles using my instructions...
Anyway, after importing your workflow, i see that in your "Populate variables" node, you created a variable named %s_s_outputfile%, but in your "Command Executor" Node, you are using the variable %s_outputfile%, which does not exist. Furthermore, i don't see that you use my first code line (the complex one), you should copy and paste it into the right side like that:
garry.png
garry.png (12.07 KiB) Viewed 8926 times
And as your variable for "outputfilename" is "s_s_outputfile", you have to set this variable in the command executor node like that:

Code: Select all

cmd /c "rename "%s_source%" "%s_s_outputfile%""
Then, i see that you don't set the new s_source variable in the command executor, which would disable the "Folder" node to copy the new File, so in your command executor node, on bottom left, set the new s_source variable to "%s_original_folder%\%s_s_outputfile%" like that:
garry1.png
garry1.png (7.36 KiB) Viewed 8926 times
As a sidenote, i don't think it is very good practice to keep multiple different workflows in one workflow template as you do... I recommend to create a new, separate workflow for the renaming stuff.
emcodem, wrapping since 2009 you got the rhyme?
graham728
Posts: 82
Joined: Sat Oct 13, 2018 10:54 pm

Re: Pick Up AQC Report PDF

Post by graham728 »

Hi,

I mustn't have saved the workflow before exporting as I have the code in the populate variables node.

I've re-followed the instructions copying in the codes and the pdf report in the source folder is renamed but not copied over. I'm getting the same cannot find the specified folder error.

I'll keep trying - thanks.
graham728
Posts: 82
Joined: Sat Oct 13, 2018 10:54 pm

Re: Pick Up AQC Report PDF

Post by graham728 »

I have it working now, the nodes were renaming the file correctly but still having difficulty delivering the file. I've just set up a second watch folder to look for the renamed PDF's first three characters which are always the same to then move it across.

Thanks,
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Pick Up AQC Report PDF

Post by emcodem »

My bad, the line for the Command Executor, bottom right in the textbox for "Set %s_source% variable to:" should more be like that:

Code: Select all

%s_original_drive%%s_original_folder%\%s_s_outputfile%
May i ask what is your strategy to investigate variable values while developing workflows? - do you use the "Generate text file" Processor?

cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
Post Reply