I was never a fan of Windows Desktop Search. I had stuck with Google Desktop Search for a long time, but gradually got sick of the CPU hogging and so gave Windows Search (on Vista) another try. It seemed to find emails in Outlook well enough, but as a tool for file-searching, it frankly sucked. It just wouldn’t find stuff I knew was there. So I was forced to go low-tech to, say, find all files with the word “wordpress blog” in them: either
- Use the “Find In Files” feature of Visual Studio
- Fire up a Cygwin bash shell and use the trusty old grep.
I was rather disappointed to find the same shortcoming in Windows 7 Search: that it would completely fail to find plaintext files that contained some string. How much simpler a request can you make?
Turns out Windows 7 can do what I am looking for, it just needs to be reconfigured in two significant ways:
- In the Start search box type in “Indexing Options” to open that control panel.
- Click the Advanced button.
- Make sure that the file extensions you hope to find are set up to “index file contents”, which isn’t the default behavior. So go to the “File Types” tab and find the extensions you’d like to find (in my case it was “php”). Highlight it and then click the “Index Properties and File Contents” radio button. If you can’t find the file type you’re looking for, you’ll have to add it at the bottom. Repeat for other file types.
- OK out of the “Advanced Options” dialog.
- Then, despite what the Windows 7 documentation says, simply adding a directory to a Library does not make it get indexed. So click the “Modify” button and manually add whatever directory you want indexed.
- You probably want to delete and rebuild the index at this point (in the Advanced Options) dialog, then go for a nice long walk as it could take hours to finish the indexing.
Do all this, and finally Windows 7 Search will at least work. Now it’s still not quite as fully-functioned as, say,Visual Studio Search, for the following reasons:
- Non-alphanumeric characters get totally ignored in the search term. E.g., I’m a big fan of FirePHP, but good luck doing a search for all instances of, say, “fb(“. The parenthesis gets dropped.