SEARCH

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.

Searching For Text Inside of a File

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.

Justin is a Linux and HTPC enthusiast who loves to try new projects. He isn't scared of bricking a cell phone in the name of freedom.

  • Published 12/5/11

Comments (6)

  1. Amir

    cool

  2. Halil el-zuabe

    One important issue – you cant search in network drives.
    I don’t understand the reason but it searches only in file names

  3. Demonkunga

    @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.

  4. nova1

    nice! i’ve always loved this about grep

  5. SStallings

    @ Halil: I have results from my mapped network drives come up in my searches!

  6. jr

    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.

Enter Your Email Here to Get Access for Free:

Go check your email!