Page 1 of 1
Pick Up AQC Report PDF
Posted: Sat Feb 02, 2019 10:36 am
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.
Re: Pick Up AQC Report PDF
Posted: Sat Feb 02, 2019 1:11 pm
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
Re: Pick Up AQC Report PDF
Posted: Sat Feb 02, 2019 7:24 pm
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.
Re: Pick Up AQC Report PDF
Posted: Sat Feb 02, 2019 8:08 pm
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 (12.07 KiB) Viewed 8921 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 (7.36 KiB) Viewed 8921 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.
Re: Pick Up AQC Report PDF
Posted: Sat Feb 02, 2019 8:23 pm
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.
Re: Pick Up AQC Report PDF
Posted: Sat Feb 02, 2019 8:51 pm
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,
Re: Pick Up AQC Report PDF
Posted: Sat Feb 02, 2019 9:09 pm
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