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.
Pick Up AQC Report PDF
Re: Pick Up AQC Report PDF
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:
After that, use a command executor node with something like this:
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
Cheers,
emcodem
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)
Code: Select all
cmd /c "rename "%s_source%" "%s_outputfile%""
Code: Select all
%s_original_folder%\%s_outputfile%
emcodem
emcodem, wrapping since 2009 you got the rhyme?
Re: Pick Up AQC Report PDF
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.
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.
Re: Pick Up AQC Report PDF
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: And as your variable for "outputfilename" is "s_s_outputfile", you have to set this variable in the command executor node like that:
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:
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.
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: 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%""
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?
Re: Pick Up AQC Report PDF
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.
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
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,
Thanks,
Re: Pick Up AQC Report PDF
My bad, the line for the Command Executor, bottom right in the textbox for "Set %s_source% variable to:" should more be like that:
May i ask what is your strategy to investigate variable values while developing workflows? - do you use the "Generate text file" Processor?
cheers,
emcodem
Code: Select all
%s_original_drive%%s_original_folder%\%s_s_outputfile%
cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?