Searching Using Results Lists

By using the Find in Files dialog box, you can search files and review search matches in report format. Files are searchable whether they are currently open in an editor or whether they are in a directory on a network share. Matches from searches that were performed with the Find in Files dialog box appear in the Find Results 1 and Find Results 2 windows, which allows you to view the exact text from the line containing the match.

You can also search files and review the matches one by one using the Find dialog box. For more information, see Searching Interactively.

To search in multiple files or folders

  1. From the Edit menu, choose Find and Replace and then choose Find in Files.
  2. In the Find what text box, enter a string.
  3. In the Look in list, enter one or more directory or file names (separated by semicolons) to search in, or choose ellipses to create a list of directories and files.
  4. In the File types list, select one of the listed sets of file extensions or enter the extensions for the types of files to be searched, separated by semicolons. Use *.* to search all files in the directory listed in the Look in drop-down list.
  5. Select from the remaining search options to improve the accuracy of the search. For more information about search options, see Find in Files Dialog Box, Wildcards, and Regular Expressions.
  6. Choose Find to begin the search.

Tip   To cancel a search in progress, choose Stop.

The matches for the search appear in the Find Results 1 window by default. You can browse the search matches by double-clicking each entry in the Find Results 1 window. To view the search results in a new window, select Display in Find 2. For information on search and replace keyboard shortcuts, see Shortcut Keys.

Tip   You can search incrementally against large sets of matches in the Find Results window to locate a specific search match quickly. For more information, see Searching an Active Document Incrementally.

To replace across multiple files or folders

  1. In the Find in Files dialog box, choose Replace, or choose Replace in Files from the Find and Replace submenu on the Edit menu.

  2. In the Replace with text box, enter the text with which you intend to replace the search text.

  3. Choose Replace to replace the current search match with the text in the Replace with text box. You can skip a single match by using Find Next or skip an entire file using Skip File.

    — or —

    Choose Replace all to replace all search matches with the text in the Replace with text box. Select the Keep modified files open check box if you want to undo some of the replacements at another time.

Caution   Replace all replaces all search matches, including those in files you have skipped with the Skip File or Find Next button. You can only use Undo for replacements made in files that remain open after the replacement operation.

Replacement information appears in the Find Results 1 window by default. You can browse replacements by double-clicking each entry in the Find Results 1 window.

See Also

Searching and Replacing | Searching Interactively | Searching an Active Document Incrementally | Find in Files Dialog Box | Replace in Files Dialog Box | Regular Expressions | Wildcards