How to Search Inside Files on Windows?

—   Aryan K on Jan 22, 2022
Last Modified : Apr 16, 2024

You must be aware that Windows XP allowed us to search for files that contained some specific keywords, supporting most file types. Windows 7 also searched inside of file contents for keywords, but was limitied to text (and related) files only. For eg. (*.txt, *.doc, *.inf, *.ini, ...), not (*.conf, *.dat, *.*, ...) etc.

Even if you look at the Windows search filter queries, there does not appear to be an option to look inside the contents of a file while searching. So how do we achieve it? Well, lets see.

Searching Inside of File Contents

Windows has a feature called Indexing Options which basically makes your searches faster by creating an index of files, that way windows does not have to look for each and every file, every now and then. You can get to indexing options by going to Start --> Control Panel --> Indexing Options or you may even search for "Indexing Options" directly within the start menu.

Now, If you click the Advanced button in Indexing Options and go to the File Types tab, you will get a list of all file types and the way they are to be indexed (only the properties or the contents as well). Whatever file tyeps you want, you can specify either only the Properties or the contents as well. Take a look below.

You can also make a normal search, and once the search is finished, you can click on "File Contents" button under the "Search again in" option, which is located at the end of the search results. Please remember that this option will only be visible if that folder you are searching is not marked for indexing, as in that case the file contents would be searched autoamtically without any specification of any sort.

Using Third party tools

There are also many third party tools which allow you to search within file contents, well you can also use them for you purpose. One of the popular third party alternative is.

  • Astrogrep : grep is a commandline utilty on linux that is used to search for files with regular expression patternss. Astrogrep is windows alternative to it which can look inside of file contents, it also supports regular expressions and much more. You can learn more about it on their website.
Author's Picture
Aryan K
Creator Metabust.com

I am a Full stack developer and love to build stuffs with code. Metabust is my personal space I created to share my knowledge and experience on a wide range of things and connect with you people, If you're a developer you'll find it useful.