I have files that have this long name format
xx_0504_01_tra_xxxx_xx.ps
I would like to automatically change to
travel_0504_p01.ps
Would you help me program this?
thank you very much
I need help with truncate and rename files
Moderators: Dorian (MJT support), JRL
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Here is the renaming portion for you.
You may need to loop through a directory to get the OldFile names. See help on GetFileList command and use the programming above for each filename.
Code: Select all
Let>OldFile=xx_0504_01_tra_xxxx_xx.ps
MidStr>%OldFile%,4,4,core1
MidStr>%OldFile%,9,2,core2
Let>NewFile=travel_%core1%_p%core2%.ps
Message>Old file %OldFile%%CRLF%has been renamed to%CRLF%%NewFile%
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!