Archive for the ‘Textpad 5.0’ Category

PostHeaderIcon Some examples of using Textpad’s Find in Files

Many years ago I started using Textpad as a replacement for Notepad. I soon discovered several features that made my life so much easier. I now don’t know what I would do without them. I’d be interested in hearing if there are any other similar products that include these features. Both features that I will describe here involve the “Find in Files” functionality.

The first aspect of the “Find in Files” function is the fact that Textpad will display the results of the search and clicking on each line brings you directly to the file and place in the file that the search text is found. The file is opened in a new tab so the search is still available. Before 5.0 the search results ended up in it’s own tab. In 5.0 the search results ends up in a special window at the bottom of the Textpad window.

The example that I’m using is searching a Dr. Watson file for “when:”. This let’s you see the frequency of abends on a PC that is having problems.. This search will result in a list of abends with the date/time of each abend. Double-Clicking on one of the search result entries will bring you right to the start of the Dr. Watson entry in the log file.

Find in Files dialog:

Results of searching a Dr. Watson log file (click image below for larger image):

The second example is useful when you need to replace something in several text files that you know is unique and safe to change.

  1. Using the “Find in Files”, do the same as the Dr. Watson search above except, instead of giving a specific file name, use wildcards.
  2. Pick the top level directory of the files you want to search
  3. Check the “Search subfolders” option
  4. The search results will contain all the lines that contain the search text.
  5. Right-click in the search results and click on “Open All”.
  6. All the files named in the search results will open up in seperate tabs.
  7. Use the “Replace” option under the “Search” menu to identify what to replace. Click the “All Documents” option and then click “Replace All”.
  8. The text will be replaced in all the files.
  9. Under the “Files” menu click “Save All” and “Close All”.It’s easy and fast.

If you can’t quite get something unique across all files you can do it several times using unique search criteria that meets your needs. The nice thing about doing it this way rather than a command line tool is that you can easily see how good your search is and whether or not it’s safe to really do the “replace all” before actually doing it.