Microsoft Windows search file contents capabilities are tremendously helpful when you are searching for files that contain specific words or text strings. This is of course different from when you are searching for files with specific names. Here we are talking about files where you don’t care about their names, but only whether or not they contain specific words.
In other words, you want your search to look inside your files for certain keywords, not only look at the filenames. This can be particularly useful for example if you need to search html files for text or search in pdf documents, Word documents, in fact any type of document you can think of that contain specific words.
It turns out that you can have Windows search within files indeed. But you might have to change a few Windows options for it to work properly. If those settings aren’t set up correctly, it might look like the search file contents in Windows 10 does not work.
Let’s take a look at this.
In order to be able to use the Windows search file contents capabilities, you must know about something called “Indexing”. When you are performing a search that wants to display results for all files on your computer that contain a certain word, Windows would have to go through all your files, open them one by one, look inside for your search string and list the ones that are a match for your search. This could very easily take a very long time (especially if you have a lot of files).
That is where indexing comes in. Indexing means that Windows goes through all of your files one by one and makes notes of all the words they contain. There are two important distinctions here. The first is that Windows goes through your files during times when you’re not doing anything on your computer. It uses this idle time to do something useful behind the scenes and work on its index. The second distinction to be made is that Windows keeps records in its index in a very structured way.
You could compare it with having an ordered, alphabetical list of people’s phone numbers versus a randomly garbled collection of names and phone numbers. Just as an alphabetical list will help you find phone numbers more quickly, an index is useful to help Windows search file contents more quickly.
With that said, it should be noted that by default, Windows doesn’t index your entire hard drive but rather a number of key folders (like your documents folder). What’s more, by default, Windows also doesn’t index file contents. That means that if you want to help Windows search file contents, you must enable this option in your indexing settings.
If your Windows search file contents is not working properly, you probably need to check your indexing options. To do so, click the Windows start button in the bottom left corner of your screen and select settings.
Then, in the Windows settings screen, select the option “Search”.
Now select the “Searching Windows” option.
In the search settings window, scroll down to “Advanced search indexer settings” and click that.
Now you’ll see a screen with your advanced search settings. It will normally show a status of “Indexing complete”, along with a list of folders and locations that are included in the index. You can use the “Modify” button to add specific folders if you want to index documents outside of your documents folder.
Click the advanced button to go to the more advanced indexing settings.
Now click the “File Types” tab in the advanced search options screen and then make sure to select “Index properties and file contents”. This option will help Windows search file contents in addition to just file names.
Windows will inform you that it will rebuild its index in order to include file contents information and that it might take a while to do so. Also, search results may appear to be incomplete while rebuilding of the index is going on. Click ok to continue.
The indexing status window will now show that “Indexing in progress”.
In addition to the information discussed above, I have included a small Windows search file contents example here. I have created a small rich text file in my documents folder (which is indexed by the Windows indexer by default). I have called the file searchexample.rtf
Inside the file, I have put one word, “testsearch”. If my Windows 10 search file contents capabilities are now correct, I should be able to search for “testsearch” and have the file come up in the search results.
And indeed, if I now perform the search in File Explorer on my c: drive, I immediately see the searchexample.rtf file coming up in my search results.
However, if I use the “Type here to search” search field on my Windows taskbar, I notice that my Windows search file contents is not working here.
That’s why I always recommend searching from within File Explorer. Personally, I even prefer to disable the “Type here to search” box altogether, because it takes up space on my taskbar and I find the search results to be disappointing anyways.
With this I hope to have given you a better understanding of how to search within files with Windows 10 and how to change your indexing options for better search results.
Related: How to search for files in Windows 10.