Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Windows XP we can search for files that contain a defined keyword (inside all files types).

Windows 7 can look inside files for a keyword, but only for text files. (*.doc, *.txt, *.inf, ...), not (*.conf, *.dat, *.*, ...).

Microsoft search filters don't contain any filter I can use for this.

How is this possible?

share|improve this question

13 Answers 13

up vote 97 down vote accepted

To get to the Indexing Options:

Start --> Control Panel --> Indexing Options

See Change advanced indexing options for more information.

If you click on the Advanced button in Indexing Options and go to the File Types tab, you will get a list of file types and the way they are indexed. For the file types you want, you can specify that you want the file contents indexed, and not just the file properties.

Or you can just do a normal search, and after the search is finished you can click on the "File Contents" button under the "Search again in" field (which is located after the end of the search results list, if you scroll to the bottom).

Based on this page, the "File Contents" option won't always show up - only when the folder being searched is not marked for file content indexing; in that case, file contents are supposedly searched automatically, without having to specify this option explicitly.

share|improve this answer
Or maybe by using the the FIND command instead. –  Revolter Oct 25 '09 at 12:10
@Synetech inc. - you can pipe the results of another command into find, so there's no reason you couldn't run it on the entirety of the hard drive (maybe using an attrib search) –  warren Mar 22 '11 at 13:08
@Synetechinc. You can say: find "word" * –  Oscar Mederos May 17 '11 at 7:12
@nikhil: Unfortunately you don't mention how to get to Indexing Options, nor does the page you link to. –  Steve Jul 12 '11 at 10:49
-1 as it doesn't search in non-indexed locations, even when the option is selected. @Shimmy Sean's answer below does. –  HaydnWVN Jan 19 '12 at 13:30

I've always gotten better performance when searching inside files by using a GREP tool. I'm a fan of AstroGrep.

share|improve this answer
AstroGrep is lean & mean. 80k, lightning fast, & searches network locations. Thanks for the heads up on this tool. –  Sean O Nov 30 '09 at 16:39
+1 for AstroGrep. Nice tool –  sloth Dec 21 '10 at 8:54
+1, I use this tool too. –  Mas Aug 9 '11 at 11:32
Wow!! this one is good! –  Rodniko Apr 22 '12 at 15:19
Also a plug here for Agent Ransack. Shell integrated, small and fast, supports regex as well. –  ingredient_15939 Mar 8 '13 at 5:23

I believe you can also just enter "content:blahblah" in the search filter box in upper right corner of Windows Explorer. This works at least for Text files and Office documents. It also works for source files.

share|improve this answer
Doesn't seem to work –  ThomasMcLeod May 31 '11 at 4:35
I found that it is also localized, in German for example inhalt: –  mjustin Oct 13 '11 at 8:36
'contents:$$$' where $$$ is the content i'm looking for works for me in Windows 7 –  HaydnWVN Jan 19 '12 at 13:29
It looks like SP1 ignores content: and contents: now, even though it still turns blue; instead you have to click File Contents at the bottom of the search results. –  SilverbackNet May 16 '12 at 23:22
Doesn't work in Windows 7 32 bit. I copied and pasted from a file in the directory being searched and it said that string wasn't found. –  weberc2 Oct 26 '12 at 13:52

You can play with findstr.

findstr /s /m searchstring *.*

Options description:

/S         Searches for matching files in the current directory and all subdirectories.
/M         Prints only the filename if a file contains a match.
share|improve this answer

Agent Ransack is always worth a look. It's free, fast, good reputation, and doesn't use indexing.

share|improve this answer

In Windows Explorer, menu Tools -> Folder Options:

Press on the search tab and here, the first option: what to search, choose to search for non-indexed files inside the file.

share|improve this answer
This seemed to ignore the option, because my file type was configured in the Index Options to not be treated as a text file. A .properties file does not get searched for text by default. –  Richard Le Mesurier Oct 31 '12 at 11:32
This was the only answer on this page that worked for me. I had to check the "Don't use the index when searching..." option, too. –  Fuhrmanator May 1 '13 at 13:20

Windows 7 still has the ability to search for strings inside files everywhere (and not in indexed locations).

In Windows Explorer, go to menu Tools/Folder options and select "Always search file names and contents".

Probably the file types still have to be set up correctly in Advanced Options of Indexing Options".

share|improve this answer
+1 for the Indexing Options. These are VERY IMPORTANT because they define what Windows means by "searching" a file. e.g. I have an ANT build script .properties file that Windows would not search because it wasn't configured to treat it as a text file. –  Richard Le Mesurier Oct 31 '12 at 11:30

Have you tried search the internet for the correct iFilter (for instance - http://www.ifilter.org/)?

If you have the right iFilter, Windows should be able to search and index its content.

share|improve this answer
do i need an "iFilter" for every file extension ? –  Revolter Oct 25 '09 at 3:09
Most likely yes - as each file extension assumes that the file contents would be specific for a particular extension. –  rifferte Oct 25 '09 at 3:18
Also - please review these two links - they have lots of content that should help you out: microsoft.com/windows/products/winfamily/desktopsearch/… gallery.live.com/default.aspx?pl=6 –  rifferte Oct 25 '09 at 3:20

The answer by Sean Sexton gave me what I was looking for (putting "content:" in the search text box). But I think the following graphical explanation might be of help to others.

The equivalent of this search in XP Search Companion (dog):

XP Search Companion

is this in Windows 7:

Windows 7 Search

share|improve this answer

Notepad++ can do this and is free. Find in files is CTRL-SHIFT-F.

share|improve this answer

In Windows XP you could add further (text) file types to be searched via the registry:

Windows Registry Editor Version 5.00


I'm not sure whether this works with Windows 7 as well.

share|improve this answer

You could try using cygwin and searching *nix commands and search using the grep utility

From Manual:

grep options pattern input_file_names
share|improve this answer

Windows 7 SP1 ignores content: and contents: for me now, and it looks like the mechanism has changed: Now you type in what you want, and as soon as the search starts, a row at the bottom shows up with "Search again in:" Libraries, Computer, Custom, Firefox, and most importantly, File Contents. Click that and it restarts the search within files, even if the folder is unindexed.

share|improve this answer
on my machine File Contents is not given as an option –  Richard Le Mesurier Oct 31 '12 at 11:25
Are you using Win8? There, it's changed to where you have to click on the search tab, open Advanced Options, then File Contents. –  SilverbackNet Oct 31 '12 at 21:03
Win 7 Home Premium 64bit SP1... strange its not there; commented to alert other confused readers (cos this issue really rattled me a lot and almost led to a BIG mistake sending passwords to a client in a file that wasn't being scanned as text) –  Richard Le Mesurier Nov 1 '12 at 5:14

protected by Troggy Dec 17 '10 at 13:46

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.