cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Rob Foster Member
Member

script to create a folder that is named with the first 6 characters of the file name

Hi There

We are moving from Odystar to Freeflow Core, our system at the moment (not set up by myself i might add) allows you to create a Low Res File and a High Res File and then places them in a folder. We rename all our print files with the first 6 characters being the job number of the job. When Odystar creates the low res and the High Res Files it also creates a folder for each using the first 6 characters of the filename as the name of the folder, this is apparently possible in FreeFlow core with a script, im wondering if anyone could help me achieve it?

Thanks

Rob

0 Kudos
11 Replies
FreeFlow Production Workflow Moderator Eric-Xrx
FreeFlow Production Workflow Moderator

Re: script to create a folder that is named with the first 6 characters of the file name

Rob

First open the help page, then select Appendix: Job Properties -> Job Information.  The first item is $FFwfJob.jobName$.  This will give you the full job name.

Since you only want part of the job name look in the help at:

Workflow Setup -> The Workflow Setup Tab -> Process Variable Operations. 

You'll want to remove a substring with X=1 and Y = 6. The string is $FFwfJob.jobName.substring(1,6)$

This is the value that you will pass to your external script.

The Appendix lists all the other system values that are available to use within your workflows.

ET

0 Kudos
Rob Foster Member
Member

Re: script to create a folder that is named with the first 6 characters of the file name

Hi eric

 

Thats really helpful, thank you, i have to confess im out of my depth a little here, but i will study everything youve pointed me at and report back with any issues

 

Thanks Again

 

Rob

0 Kudos
carlossbenes New Member
New Member

Re: script to create a folder that is named with the first 6 characters of the file name


@Rob Foster wrote:

Hi There

We are moving from Odystar to Freeflow Core, our system at the moment (not set up by writeandgood i might add) allows you to create a Low Res File and a High Res File and then places them in a folder. We rename all our print files with the first 6 characters being the job number of the job. When Odystar creates the low res and the High Res Files it also creates a folder for each using the first 6 characters of the filename as the name of the folder, this is apparently possible in FreeFlow core with a script, im wondering if anyone could help me achieve it?

Thanks

Rob


script doesn't work. What can i do?

0 Kudos
FreeFlow Production Workflow Moderator DavidU54339-XRX
FreeFlow Production Workflow Moderator

Re: script to create a folder that is named with the first 6 characters of the file name

My recommendation for debugging/writing the external script is to contact the Xerox Solutions Enablement Team.

0 Kudos
Johannes F
FreeFlow User

Re: script to create a folder that is named with the first 6 characters of the file name

Hi Rob,

in my opinion you need to use an external node and a batch file to create a directory (with the first 8 characters of the file name) and to place the PDF in this directory. I hope you have the FreeFlow Core Advanced Automation license active, this is needed to find the External node...

So instead of using the "Save" node you just use the "External" node, upload the batch file attached to this post and configure the parameters. To make it easier I created a short document describing the process.

I am interested to hear if this was useful and if you can use it. 

Johannes

www.jofeco.com
0 Kudos
Rob Foster Member
Member

Re: script to create a folder that is named with the first 6 characters of the file name

Hi Johannes

I only just noticed there had been a reply to this, i didnt get a notification, i followed your instructions, this is what happens...

A folder is created in the main directory called by the first part of the directory name , not by the first 6 characters of the filename and the file is not placed in it.

So The diirectory is called Hi Res Waiting Approval

The folder created is called Hi

The filename 513602_Interact Pro SME A5 Flyer_PQ.pdf

so it should create a folder in Hi Res Waiting Approval called 513602

I dont know how to put a screenshot on here that would explain it a bit better.

Any help appreciated

Thanks

Rob

0 Kudos
FreeFlow Production Workflow Moderator DavidU54339-XRX
FreeFlow Production Workflow Moderator

Re: script to create a folder that is named with the first 6 characters of the file name

The bat files work for me. I submitted a job "atlanta.pdf" which is placed in a created directory "atlant" (see screensnaps). I had to change one line in the bat file to enable 6 characters to print: set NumPath="%FileName:~0,7%" . I know there is a problem with submitting "photos" on the website. You can submit videos instead.

script3.pngscript2.png

0 Kudos
Rob Foster Member
Member

Re: script to create a folder that is named with the first 6 characters of the file name

Hi David

Thanks for responding, i thought i would go back to basics so what i did was at the end of the workflow i added the external node, as per the screenshots added "$FFin$" "$FFout$" "C:\Temp", i had to create the Temp folder on my c drive, so what happened was that in C Temp it created a folder called temp, it put the file in there, but it renamed the file temp as well, as per screenshot, i think i must be missing something simple here.

(view in My Videos)
(view in My Videos)
Rob

 

0 Kudos
Rob Foster Member
Member

Re: script to create a folder that is named with the first 6 characters of the file name

Hi David

Thanks for responding, i thought i would go back to basics so what i did was at the end of the workflow i added the external node, as per the screenshots added "$FFin$" "$FFout$" "C:\Temp", i had to create the Temp folder on my c drive, so what happened was that in C Temp it created a folder called temp, it put the file in there, but it renamed the file temp as well, as per screenshot, i think i must be missing something simple here.

(view in My Videos)
(view in My Videos)
Rob

 

Tags (1)
0 Kudos