Rename files based on contents
Posted: Thu Aug 21, 2008 4:40 am
I want to use Robotask (v 2.2) to change a file extension based on the contents of a 'text' file. The scenario is:
There will be several files in a directory, all called *.edi
I need to rename the files to:
*.CTI if the string "INVFIL" appears in the file, *.CTS if the string "DELHDR" appears in the file and *.CTA if the string "ACKHDR" appears in the file.
I have tried to use the {TextFile(file_name)} variable, but I am unsure as to the correct syntax of this.
Can anyone give some assistance as to how to do this?
Thanks
There will be several files in a directory, all called *.edi
I need to rename the files to:
*.CTI if the string "INVFIL" appears in the file, *.CTS if the string "DELHDR" appears in the file and *.CTA if the string "ACKHDR" appears in the file.
I have tried to use the {TextFile(file_name)} variable, but I am unsure as to the correct syntax of this.
Can anyone give some assistance as to how to do this?
Thanks