Function reference
Replaces all occurrences of a string with a file. (Non case sensitive)

ReplaceTextInFile ( File, SearchFor , ReplaceWith, AddFileToJobLog )

Argument Description
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.

Example 1
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’)

Need more help with this?

Thanks for your feedback.