That still did not work if the PDF being processed had a space anywere in the name.
I did get it to work with This process.
Bat File:
copy %1 %2
Paramiters:
"$FFwfJob.preflightReportUri$" "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\PreFlight_$FFwfDoc.inputFileName$"
Thanks for all your help.
This works for me:
bat:
copy %1 "E:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\"%2"_report.pdf"
Parameters:
"$FFwfJob.preflightReportUri$" "$FFwfDoc.inputFileName$"
or
"$FFwfJob.preflightReportUri$" "$FFwfJob.jobName$"
OK I have it kind of working now.
.bat =
copy %1 "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\%2"
Paramiters ["$FFwfJob.preflightReportUri$" Preflight.pdf]
Paramiter %2 will only work as static text for some reason when I put in $FFwfDoc.inputFileName$ it gets passed as Xerox. I eve put the same code in a watermark on the file and it works there just not when passed to the .bat
OK I checked the Log and as you can see from below the file name is being truncated some how
Log:
E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Scripts>copy "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Platform\Spool\10c7e4f9-a464-48d1-9e64-9676afd3b542\REPORT_" "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\Copy\Test Workflow PDF_New_3.pdf"
The system cannot find the file specified.
It should look like this:
E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Scripts>copy "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Platform\Spool\10c7e4f9-a464-48d1-9e64-9676afd3b542\REPORT_
_63718833571816.pdf" "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\Copy\Test Workflow PDF_New_3.pdf"
Becasue ther is a space in the file name generated by FF Core it is getting truncated.
File Name: REPORT_ _63718833571816.pdf
Try this:
Where copy_pf_report.bat contains:
copy %1 C:\out\%2"_report.pdf"
This will save the preflight report to the folder C:\out with the job name+ _report.pdf.
To try to figure out what is happening when a script is run you can check:
stderr.log
stdout.log
in C:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts\External Process Status
That will give you more hints of what is going on than just the "Job # is in aborted state" message.
I have been working on a process that copies the PreFlight PDF to the same folder my Completed PDFs go when ther is a failure.
I have tried every thing but whenever there is a variable it fails.
I tred with a bat file with no variable and if works but as soon as I intorduce a variable I get an "Job # is in aborted state" message.
This .bat works
[copy "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\Test Workflow PDF_New.pdf" "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\Copy\Test Workflow PDF_New_2.pdf"]
But this .bat failes.
[copy %1 "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\Copy\Test Workflow PDF_New_2.pdf"] The paramiter that is passes to the .bat file is [$FFwfJob.preflightReportUri$] and for arguments sake = E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Platform\Spool\05d126e7-43fc-44e1-a60a-72d5bfa13f17\REPORT_ _63718833571816.pdf
I also tried this
[copy "%1" "E:\Xerox\Core\00000000-0000-0000-0000-000000000000\Data\Save Destinations\CSR Review\Copy\Test Workflow PDF_New_2.pdf"]
Solved! Go to Solution.