Previous Topic

Next Topic

Book Contents

Book Index

Find Or Replace

Note: A Replace operation can be applied only to text files. If a binary file is encountered, the script might fail with a macro error.

Find Or Replace Finds (that is, counts) or replaces particular words or phrases in files. It can also handle special characters such as tabs and line feeds.

Input Parameters

Output Parameters

Special Characters

FindOrReplace can handle special character operations such replacing all tabs with three spaces or stripping carriage returns from a file. To work with special characters, represent those characters by using special character macros in your FindOrReplace_Find or FindOrReplace_Replace parameters as appropriate.

The following special character macros are supported.

For example, to:

Notes

Use the replace operation only against text files. Do not use to replace text in a binary file; this could have unforeseen consequences.

You can run this built-in script only one time per file.

This script cannot be run as the first step in a task.

Example #1

Ed wants email that lists the number of times that the word "- PAGE" appears in files that pass through MOVEit Automation.

To perform this operation with MOVEit Automation:

  1. Create a new task with a source, process, destination, schedule and next action.
  2. Select "Find Or Replace" as the process
  3. Set process parameters:
  4. Configure the next action to:

Example #2

Jane wants to replace all instances of "bubbler" with "drinking fountain" in files that pass through MOVEit Automation.

To perform this operation with MOVEit Automation:

  1. Create a new task with a source, process, destination and schedule.
  2. Select "Find Or Replace" as the process
  3. Set process parameters: