Search and Replace Scripts Overview

Search & Replace relicon1 Script Operations Overview Also see Format of Script Files

The Script dialog allows you to create and edit Search and Replace scripts. You can use scripts to:

  • Specify multiple search/replace combinations for processing; Save Search or Replace strings for later use; Process multiple drives/directories and/or file masks.

  • Apply a Script to the search &/or replace string in advance of a later operation.

  • Override the Search and Replace strings in the main dialog but still use the Masks and Paths; Override anything but the list of paths; Use only the Search/Replace list in a script.

  • Interactively insert the current main dialog search/replace strings and mask/path into a script (see Search/ Replace Items & Paths/File Masks).

  • Quickly import a list of search &/or replace strings via a simple script (see Format of Script Files).

  • Make decisions about the files to be processed via the Advanced Script settings and boolean Expression Evaluator.

  • Automatically run a search/replace several times to complete a complex operation via an iteration operator.

  • Chain scripts to follow each other sequentially via the Linked Script specification.

Notes:

  • If you are running a script from the command line, add the /s switch to launch Search and Replace and automatically initiate a search. If your script involves a replace, use /r in your command line to initiate the replace.

  • Script-oriented keyboard shortcuts are available: a) CTRL + Main Dialog Script Button – writes all program settings to SRDUMP.SRS in the same path as sr32.exe, b) CTRL+ Insert in Script Dialog – Inserts the respective lines from the main dialog into that script dialog tab, c) CTRL+ Remove All in Script Dialog – Deletes all current entries and add respective lines from the main dialog into that script dialog tab.

  • Scripts are stored in ASCII text files that can be edited or printed with any text editor (see Format of Script Files). Comments can be added via the Advanced Script dialog and manually. To convert scripts created with earlier versions of the program, load them and then save them using the same name.

  • You can enter Search strings only, both Search and Replace strings, Path and mask strings only, or all the fields in a script. You can also override some of the values from the main window by entering new Search and Replace strings or new Path and Mask strings.

  • If you create a script containing only a mask & path, you should enter at least one dummy search string in the search string section of the editor. You can also override some of the values from the main window by entering new Search and Replace strings or new Path and Mask strings.

  • When a script is active, the Search, Replace, File Mask, and Path fields in the Search and Replace main window reflect the script in use. For example, given a script named, example.srs, which only has settings for a search string, the Search field in the main window will change to read “Use Script file: d:\example.srs”. If example.srs also involves a replace string and a file mask, the Replace and File Mask fields will also change to read, “Use Script file: d:\example.srs”.

  • See Special Script Prepend-Append Operators for information on operators that are available for prepend and append operations.

  • See Special Date Filter for information on the %%today%% setting for manually revised scripts the Min Date Filter= and Max Date Filter= switches in scripts.

Script Operations Overview