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
- From the Edit menu, choose Find and Replace and then choose Find in Files.
- In the Find what text box, enter a string.
- 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.
- 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.
- 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.
- 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
- In the Find in Files dialog box, choose Replace, or choose Replace in Files from the Find and Replace submenu on the Edit menu.
- In the Replace with text box, enter the text with which you intend to replace the search text.
- 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.