Search and Replace Main Dialog

Search and Replace for Windows allows you to search for (and replace) a string in a set of files in a path you specify. You can also use Search and Replace as a file finder by leaving the Search string blank and entering a file mask & path. The found strings and the files they are found in are displayed in a list box using a customizable color (see General Options). The sort order of the files can be adjusted in Options-Search. Options-Output is used to change the information listed. Options-Filters can be used along with the mask and path to operate on some files but not others.

Click on the graphic below for help on the main window fields or scroll the screen down for a text description of the fields.

image\SRMAIN2_shg.gif

Details on the Main Window Fields:

Search String: Enter the string to search for in this field or select a previous search string from the combo list (image\B_DROP1.gif). The search string you enter can be a simple search or a regular expression. To create a binary search using special characters, click the binary mode button to the right. The number of items saved in the combo lists is configurable in General Options. If you do not enter a Search String, the File Mask and Path fields will be used to execute a File Find, with the results displayed in the Search Results list.

Search String Binary Mode button (image\b_path4.gif): Click this to use the Binary Mode dialog to create multiple line and/or special character Search Strings. When you are done creating a binary mode search string, "Binary mode -->>" is displayed on the main dialog. Binary mode strings will not be shown on the main screen. To view or edit the string, click the image\b_path4.gif button again to activate the binary dialog.

Replace String: Enter the string to replace the search string with in this field or select a previous replace string from the combo list (image\B_DROP1.gif). The string you enter can be a simple replacement, a regular expression, or a replacement involving special replacement operators. To create a binary replacement using special characters, click the binary mode button to the right of this field. Please See Word Documents Notes for important information on operations in non-text files such as Word documents, Word Perfect documents, spreadsheets, etc. Replacements are not made on files in ZIPs.

Replace String Binary Mode button (image\b_path4.gif): Click this to use the Binary Mode dialog to create multiple line and/or special character Replace Strings. When you are done creating a binary mode Replace string, "Binary mode -->>" is displayed on the main dialog. To view or edit the string, later, click the button again.

File Mask: Enter a single file name or one or more include &/or exclude File Masks to specify the files &/or subdirectories to search. File and directory masks can be combined to create complex file mask expressions to include files in some subdirectories while excluding those in others. The wildcards characters * and ? may be used in a manner similar to the DOS dir command, e.g., *.*;*.txt;*.doc;*.??1. More than one mask can be specified by using a semicolon separator (see above). Exclude masks use the ~ character to denote a mask NOT to search (e.g., *.*;~*.swp;~*.exe;~*.dll). To specify a ~ character as part of the file mask, use \~ to denote the literal (e.g., *.*;\~*.tmp). If you have "Search ZIP Files" turned on, the mask will be applied to files inside of ZIP files as well as ordinary files in the path specified in the path field. Your last few search file masks are saved for you and you can find them in the combo box list (image\B_DROP1.gif). See File Masks for more information.

Notes:

File Mask Editor button (image\b_path4.gif): Click this to activate the Include Exclude Files & Directories dialog. This dialog is used to help you generate complex mask expressions that will be inserted into the file mask field.

Search Path: Enter the path where files to search reside. You may type it by hand, navigate to it by using the Browse button (image\b_path4.gif), or select a previously used path from the combo list (image\B_DROP1.gif).

Notes:

Path Browse button (image\b_path4.gif): Click to select the path where files to search reside via the Select Path dialog. If the Path field (described above) contains a valid path, it will be your starting path in the Select Path dialog. Otherwise, the current path will be used.

Search Results List: Your search results are displayed there. The information that is output to the Results list is configurable in Output Options, e.g., filenames, number of hits, hit lines, etc. The sort order of the files can be adjusted in Options-Search. The display colors of file names and strings found is configurable in General Options. If you're having trouble seeing the results, try changing the colors. You can also enable/disable the tree-style list in Options-General. Double clicking on a line where a search string is displayed will display the View Context screen. The search hit tree can be expanded/collapsed by clicking on the image\plus.gif / image\minus.gif icons or Keyboard Shortcuts.F4/F5 move between files. The Enter key also activates the context viewer (Win95/NT version only). Double clicking on a line that lists a filename will launch the executable associated with that file, if one exists (e.g., in File Manager). You can also use the right mouse button to display a menu or use the Ctrl+C key to copy highlighted item(s) in the list box contents to the Clipboard. Also see Binary Search Results for a sample dialog if your files are binary.

Search Button: Click this button to start a search.

Search and Replace Button: Click this button to start a search and replace. We recommend that if you use this feature you also enter a backup path in the Options dialog (see Replace Options).