Replaces all occurrences of a string with a file. (Non case sensitive)
ReplaceTextInFile ( File, SearchFor , ReplaceWith, AddFileToJobLog )
|File||The name of the input file in which you want to replace SearchFor with ReplaceWith.|
|SearchFor||The string to replace.|
|ReplaceWith||The string to use as replacement.|
|AddFileToJobLog||‘1’ or ‘true’ will add the modified file to the Job Log.|
Data type: String
If any replacements are made the function returns a TEMP file name else it returns the original file name from the argument.
The function does NOT modify the file in the argument.
This expression is replacing all occurrences of ‘abc’ with ‘xyz’ within the file ‘c:\myFile.txt’
The altered file is added to the Job Log.
ReplaceAll( ‘c:\myFile.txt’,‘abc’ , ‘xyz’, ‘1’)
Last modified: 23 May 2021
Thanks for your feedback.
Post your comment on this topic.