Feedback

  • Contents
 

File Find Replace

This File I/O tool finds the first or all occurrences of a specific string in a file and replaces them with a specific string. This tool accepts any document type.

Inputs

Source file

The fully qualified path to and name of the file to process.

Find

The string to find. You may not specify the "/n" character in the string to search for.

Replace

The string used to replace the string specified in Find.

Replace All

Set this value to True to replace all occurrences. Set this value to false to replace only this first occurrence.

Result file

When processing is complete, the new file is saved with the file name you specify here. You must specify a fully qualified path.

Outputs

Replaced occurrences

The number of replacements that were made.

Error messages

The reason this tool failed. Below is a list of possible explanations:

 

Error Message

Explanation

'Find' string cannot contain an \n character.

The string you specified in Find contained a newline ("/n") character.

"Success"

This tool executed successfully.

FileIO error(%d) on file(%s) 

An error occurred while processing the file.

Fatal Error

Some other error has occurred. Make sure the file exists.

Exit Paths

Success

This tool takes the Success exit path if the operation completes successfully.

Failure

This tool takes the Failure exit path if the process failed. See the Error Message output parameter for an explanation of returned error codes.