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
Rename files based on contents
Rename files based on contents
Variable {TextFile()} returns the content of specified file.
You can use this in "If...then" action.
Can you send me your task? my address is oleg (at) robotask.com
You can use this in "If...then" action.
Can you send me your task? my address is oleg (at) robotask.com
Rename files based on contents
Oleg
Many thanks for your help in solving this particular issue.
Thanks
David
Many thanks for your help in solving this particular issue.
Thanks
David
Rename files based on contents
I've placed the task into our examples repository. I think that this task will be interesting for other users too.