Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Most of the answers below are useless and do not address the question that had been asked. The problem that the OP clearly explained was that Windows Vista+ do not search the contents of certain file types (read file extensions). As they clearly said, some work while others do not. For example, it will find .txt file that contain a word, but not .cpp, .cfg, .php, or even .ini files even though they are all plain-text (and .ini files are even standard to Windows!) This problem still exists and the simplest solution seems to be this answer. – Synetech Nov 17 '15 at 19:14

13 Answers 13

up vote 121 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. – user8228 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
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
Awesome tool! Thank you! The Windows search within files is piece of..., well you know. This tool is super fast on my SAS drive and works flawlessly. Found over 200 files where the windows search within contents found only 12 and didn't display what I've been searching for, but I knew what I search and I was certain for the directory. Should I say more? Thanks again! – GTodorov Apr 11 '15 at 0:46

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
Not practical at all. – Synetech Nov 17 '15 at 18:16

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

share|improve this answer
Not practical at all. – Synetech Nov 17 '15 at 18:21
Note - I had been using AR but there are some licensing restrictions about personal vs business use. Overall though the tool works really well and give the kind of file search focus one needs. – John M Mar 11 at 4:31

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

share|improve this answer
Sublime as well – SamB Sep 15 '15 at 19:10
Not practical at all. – Synetech Nov 17 '15 at 18:16

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
Not using the indexer, so this does not fix the problem. – Synetech Nov 17 '15 at 18:16

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
Odd that indexing options affect non-indexed searches. – jiggunjer Jun 23 '15 at 11:52
Yes, the types are the problem, so this answer would have been better if it hadn’t ended just before mentioning the fix. – Synetech Nov 17 '15 at 18:17

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
Didn't work for me (with *.srt (plaintext subtitle files)). – accolade Aug 9 '15 at 11:16
"content:" is ignored... just make the test search the same string with and without "content:" and verify it... – ZEE Nov 11 '15 at 13:46
@JeffRoe, I cannot get Windows to search inside .sql files. Did you actually get the expected results? I can’t help but notice that you cropped the screenshot just above the search results… – Synetech Nov 17 '15 at 18:20
@Synetech: Yes, I definitely got the expected results. Sorry, I'm not sure what would be different in your system that would prevent it from working. – Jeff Roe Nov 17 '15 at 18:58

Have you tried search the internet for the correct iFilter (for instance -

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 ? – user8228 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:… – rifferte Oct 25 '09 at 3:20
And what if I don’t use the indexer, then what? – Synetech Nov 17 '15 at 18:20

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
This seems to do the trick in Windows 7. Unfortunately you have to create a file association for each and every damn file extension you want to search inside, but it at least it works and doesn’t require modifying the admin-level registry. – Synetech Nov 17 '15 at 19:07
I don't understand this answer, is what's posted an example of adding the filetype .dita to windows search? – user4050 Jun 2 at 13:16
Yes, that is for a .dita extension. – BennyInc Jun 4 at 9:04

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
Like the OP clearly explained, this does NOT work for certain file types.◔_◔ – Synetech Nov 17 '15 at 18:21

You could try using cygwin or grep version for windows and searching *nix commands and search using the grep utility

From Manual:

grep options pattern input_file_names

Using the Google gnuwin32 package, there is a grep version for windows

share|improve this answer
Not practical at all. – Synetech Nov 17 '15 at 18:21

You must log in to answer this question.

protected by Troggy Dec 17 '10 at 13:46

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

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