Find Text (Strings) across Multiple Files – Writing and Reading Wednesday

This trick has helped me immensely. In my Copy Editing work, I frequently have to check how previous versions of documents used a word or phrase. Was it capitalized? Was it italicized? One of the ways I do this is by building up a style guide. But there are always words you didn’t realize you would need to check.

Here is how you can check other files for a text string¹, and see how the word or phrase was used.

Software

Make sure you have Notepad++ installed on your machine². This tabbed plain text editor is very useful, and I use it every day. When you have to switch between text or code in multiple files, you will be glad to have them all in one interface.

Search Across Files

  1. Open Notepad++
  2. Go to Search > Find in Files
  3. The regular Find dialogue box opens, but this time it asks for a directory. Point it to where you have your working files.
    Note that you can replace all instances of a string with a new string across multiple files via this method, too, using the “Replace in Files” button.
  4. Enter the text string you are looking for. Here, I searched for “motif” because I didn’t know if we italicized it as we did with other foreign language words.
  5. The instances of the string show up in red, highlighted in yellow. The context also shows up around it.
    Because Notepad++ is a plain text editor, it does not show formatting. It only shows the plain text and the text around the string.

  6. Copy the file path–highlighted in green– into Windows Explorer and your file will open. Search for your term and you can see exactly how it was formatted.

It’s not a super-elegant method, but it works every time. And I will take plodding and reliable over elegant and inexact any day.


¹ “String” is a coding word, meaning a string of characters, like beads on a string. In English, you can think of this as a word or a phrase.

² Not only is Notepad++ free, I have been able to install it in even the most restrictive business environments.

Leave a Reply

Your email address will not be published. Required fields are marked *