Find A File That Contains A Particular Text String (Windows)

Windows File Explorer is many things. One thing it is not, however, is good at searching. It used to be… but somewhere along the way something got broken.

Fortunately, there’s a command-line tool that works much better than the GUI, called findstr. You can look up the options by typing

findstr /?

If you’re looking for a particular text string and you only want to know which files contain that string, use the following command:

findstr /S /I /M /C:TEXT_STRING_HERE *

The /S means search this directory and all subdirectories.
The /I means don’t be case-sensitive.
The /M means print only the filename if there’s a match.
The /C: specifies the text string you’re looking for.
The * means check everything.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.