cancel
Showing results for 
Search instead for 
Did you mean: 
barwapk
Frequent Member
Frequent Member

Save file with charater replace

Hello, I cant find a way to save PDF with replacing charaters in filename, some other way than using external and batch processing?
I need to change the spaces to underscores.
0 Kudos
4 Replies
DavidU54339-XRX
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: Save file with charater replace

If one knows what character number the space is located at, substringing could be used for the Save node's filename. For example:

$FFwfJob.jobName.substring(0,4)$_$FFwfJob.jobName.substring(-3,3)$

sub.png

0 Kudos
barwapk
Frequent Member
Frequent Member

Re: Save file with charater replace

There is no known character number it is variable

0 Kudos
StefanT-Xerox
FreeFlow User

Re: Save file with charater replace

WIth an External Process using Python, something like:

import shutil
import sys
name = sys.argv[3]
newname = name.replace(' ','_')
shutil.copy(sys.argv[1],'C:/Temp/' + newname + '.pdf')

where sys.argv[1]=$FFin$ and sys.argv[3]="$FFwfJob.jobName$"

barwapk
Frequent Member
Frequent Member

Re: Save file with charater replace

Thank You, this is it :)

0 Kudos