Fast search within text files in windows

Is there a program for windows that would do a great job of searching within files?

I have a folder that I constantly need to search in for certain text, It would be nice to have a program that caches the files and searches through them quickly, and keeps its cache updated.

I spend a lot of time searching with netbeans, notepad++ and etc, the problem is this is a folder on a network, so it opens every file each time and searches.


Solution 1:

You can use Windows Search it is available for Win XP up to Win 7. A more complete list of desktop search engines can be found at wikipedias site about desktop search engines

Edit: A good (probably the best) tool to find stuff in text files (w/o caches) is grep. (Refer to my comment to the question)

Solution 2:

I always use findstr, which is roughtly comparable to grep, but windows native.

Example:

findstr /s /i /m "MyClass" *.cpp

This will search recursively (/s) within the current folder. It will look into every file whose name matches *.cpp for the string MyClass.

/i ignores case

/m only print file names of matching files

You can open command line windows anywhere in windows by doing a right click while holding down shift anywhere on the free space in any folder. (Don't right click on files)

findstr will be noticably faster the second time you search within the same directory since windows caches opened files.

Solution 3:

Use glimpse / glimpseindex, as far as we are talking about ASCII textfiles here. It creates a very small index, since it does not store the line of occurence but only the fact that it occurs - so, a grep will be done, but only in the files actually containing the word, which is fast. Use glimpseindex
to index your harddrive, and use glimpse to search. the output is similar to grep. Easily adaptabe to emacs.