Search and Replace in Files

Find in files only works with files on disk. If you have edited a file you will find your changes will not be seen by Find in Files routine unless those files are saved before calling it.  


Text to Find  
The text to search for.  
Replace With  
   If checked allows a value to be included to replace the any matches of the search condition.  
Whole Words Only  
When this option is set the system will only find complete words matching the search criteria. So, for example, if 'cat' is the search string the system will not match occurrences of words like 'category' or 'concatenate'.  
Case Sensitive  
When this option is set the search is done case sensitively. That is to say, for example, that 'Dog', 'DOG' and 'dog' are all treated as different words whereas they are not if the option is not set.  
Prompt Each Replace  
Replace usually replaces all matching text in one go. When this option is set PSPad will prompt for confirmation before each change. This option is only available if 'Replace With' (above) is checked.  
Files Code Page  
Sets the 'Text to Find' value to the selected code page for matching with the file contents.  
Search Scope  
Project Tree  
Search all files in the current Project Tree.  
Open Files  
Search only the currently open files?  
Selected Directory  
Search all the files in the selected directory. There is a button next to the text entry area that allows you to navigate you file system to select the directory required.  
File Masks  
This option allows you to limit the files searched when setting 'Selected Directory' as the search scope. The filer is a list of semicolon (;) separated file masks. Example masks include:  
*.*      (All files)  
*.js      (Javascript files)  
ab*.*   (all files beginning 'ab')  
Include Sub-directories  
When checked the search will include all sub-directories below the selected directory. This option is only available if the search scope is 'Selected Directory'  

Search Result  
The search result are displayed under the 'Search in Files Results' LOG window.  
Click on a file bar to expand it and list the line numbers that match the search criteria or, if the bar is already expanded, to close it.  
In an expanded file bar, double-click on a line to load the file in to PSPad and have the cursor move to the selected line.  


There is a toolbar on the left hand side of the LOG window when viewing the Find in Files results  
fificonopen   Expand All  
This expands all the file bars in the results window.  
fificonclose   Collapse All  
This collapses all of the file bars in the LOG window.  
fificonopenall   Open All  
This opens all of the files listed in the results window in PSPad.  
fifopennew   Open results in new document  
This creates a new file with a report of all the matches found. See below for an example.  


·Search in Files works only with files on disk. So I recommend you save all open files before searching / replacing if those files are in search scope.  
·Find and read 2 times before you run Replace! Changes cannot be undone!  
·There is no option for Regular Expressions in Search / Replace in Files.