How to search inside files on Windows 7?
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?
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.
I've always gotten better performance when searching inside files by using a GREP tool. I'm a fan of AstroGrep.
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.
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.
Notepad++ can do this and is free. Find in files is CTRL-SHIFT-F.