How-To Geek
How to Search for Text Inside of Any File Using Windows Search

Many of us rely on Windows Search to find files and launch programs, but searching for text within files is limited to specific filetypes by default. Here’s how you can expand your search to include other text based files.
We have shown you some advanced search operators using Windows Search before and even how to change which files are indexed and how to rebuild your search index. But what about searching for text inside of .html, .php, .js, and other text based web and scripting files. Windows search also allows you to include other file extensions with a few simple clicks.
First, go to your control panel and open the indexing options.


Now click on advanced and then file types in the new window.


Find the extension of the file you would like to search the contents of and then click on the index properties and file contents radio button at the bottom of the window.
The filter description column should automatically changed to whatever filter is used to open that filetype by default.


If the filetype you are looking for is not in the list it means you do not have a program set as the default handler for that filetype. You can add the extension to the list and by default Windows Search will use a plain text filter to search the file contents.


If you search for text inside one of the new filetypes it should now show up in your search results, once the index is doing being rebuilt.


If you’d like to always search within file contents for a specific folder, navigate to the folder you want search contents for and click organize then folder and search options.


Click on the search tab and then click the always search file names and contents radio button.


The index will need to be rebuilt again and once it’s done your searches will automatically look in file content.
|
Subscribe |
Daily Email Updates |
|
You can get our how-to articles in your inbox each day for free. Just enter your email below: |
- By Justin Garrison on 12/5/11
Comments (6)
Comments are closed on this post.
If you'd like to continue the discussion on this topic, you can do so at our forum.
Go to the Forum
cool
One important issue – you cant search in network drives.
I don’t understand the reason but it searches only in file names
@Halil el-zuabe: Does the network location need to be indexed? Because I have a network location I always try to search in and it never works. I don’t have anything indexed because I’m using a SSD and was told I didn’t need to bother with an index.
nice! i’ve always loved this about grep
@ Halil: I have results from my mapped network drives come up in my searches!
I want to search within .pdf files. When I look at the .pdf option, it shows “Registered IFilter is not found.”. How do I set it to search within .pdf files?
Thanks.