Configuring Windows Search to search file contents - gHacks Tech News

Configuring Windows Search to search file contents

The search in Windows 7 and Windows 8 is configured to search file names and contents in indexed locations, and for file names only in locations that are not indexed. First thing that you may want to take a look at if search is not finding the files you are looking for is the list of indexed locations on the system. To do that click on the start orb in Windows 7, enter index, and select Indexing Options from the results.

In Windows 8 enter indexing options on the start page, switch to setttings on the right menu, and select the appropriate program from the results listing.

Both operating systems index the users folder, with the exception of the AppData subfolder, the start menu, and all offline files.

indexing options

You can add or remove locations from being indexed with a click on Modify. This opens a folder browser that you can use to add or remove locations from Windows Search.

windows search locations

Windows Search takes special care of the folders listed here. What you do need to know though is that it depends on the file type whether its contents are indexed or not. To find out, go back to the main indexing options window and click on advanced there.

Switch to the file types tab to get a list of all known file types and their indexing status.

search file contents

You will notice that Windows Search won't search the contents of the majority of files. This makes sense for binary file types for instance which usually do not reveal any data that can be used by Windows Search. Sometimes though a file type may have been classified incorrectly or not at all. You can modify individual file types here easily by selecting the file extension with eh left mouse button and switching between index properties only and index properties and file contents. You can furthermore add file extensions to the list.

What if you want to search the contents of files that are not stored in an indexed location? For that, you need to modify how Windows Search operates.

  • Windows 7: open Windows Explorer and click on Organize > Folder and Search options. Switch to the Search tab here and check the always search files and contents (this might take several minutes) box.
  • Windows 8: open Windows Explorer, click on View >Options > Change folder and search options. Switch to search tab and check the always search files and contents (this might take several minutes) box

always search contents

Here you can also include compressed files in the search which are otherwise excluded when non-indexed locations are searched.

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. cga said on October 9, 2012 at 12:32 pm
    Reply

    Sadly indexing of content on network shares is no longer possible as of windows 7, have to resort to Copernic for this now.

  2. Belleslettres said on October 9, 2012 at 2:59 pm
    Reply

    Great hint. I detected that pdf is not indexed on my PC. This seems to be a common problem. iFilter is missing, but can be downloaded here: http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=4025&fileID=3941.

  3. Ross said on October 9, 2012 at 9:12 pm
    Reply

    I use Agent Ransack (64-bit) for some searches, such as date specific ranges. Otherwise I use Copernic Desktop Search.

  4. Ken Saunders said on October 12, 2012 at 4:34 am
    Reply

    Excellent, thanks.
    Now I can also index the other two hard drives that I have.
    Does indexing happen once, or on a frequent basis?
    That could be a problem if it’s daily etc.

  5. Seban said on January 4, 2013 at 11:27 am
    Reply

    Hi,

    Someone has any idea why I can’t search in file contents, although the path is indexed and the file type is listed? I already rebuilt the search index, but that didn’t help.

    I use Windows 7 x64 SP1.

    Greetings

    1. Martin Brinkmann said on January 4, 2013 at 11:29 am
      Reply

      Not all file types are supported. What’s the file extension of the files you want to search in?

  6. Seban said on January 4, 2013 at 10:55 pm
    Reply

    Hey Martin, Thanks for your help

    Matlab files, the extension is .m

    In advanced options I checked if Filter Description is set to Plain Text Filter. It is.

    Danke nochmal ;)

    1. Martin Brinkmann said on January 4, 2013 at 11:09 pm
      Reply

      I never encountered them before, are they plain text files? When you open them in Notepad, are their contents readable or scrambled?

  7. Seban said on January 4, 2013 at 11:29 pm
    Reply

    Yes, you can edit them in Notepad/Notepad++ and I guess in any other text editor, too.

    I learned about another way to search for functions in the m-files by using Notepad++’s directory-search (ctrl-shift-F).

    Greetings

    1. Martin Brinkmann said on January 4, 2013 at 11:37 pm
      Reply

      Let me know if this helps please: http://www.lesession.co.uk/abc/Search_abc_XP.htm

      Just do it for the .m files and make sure you backup the Registry first.

  8. Seban said on January 5, 2013 at 1:06 am
    Reply

    Ok, I will try this tomorrow. thanks a lot

  9. Ian Clarkson said on October 23, 2013 at 6:22 am
    Reply

    Thanks, this web page https://www.ghacks.net/2012/10/09/configuring-windows-search-to-search-file-contents/ saved me a heap of worry and more wasted time. I knew about indexing locations, but didn’t get onto file types. I had to add some file types for indexing – .dfg and .otter. This is on my laptop. (The desktop machine had problems too, but I think some tinkering fixed it.) I think my laptop used to look for these files (not sure) but did no longer. Some hiccup. I restarted indexing and found a particular word in an .xml file, but not the others. Should be ok now. THANKS AGAIN.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.