Find in Files Fix in XP

It took me some time to find the problem with the “Find in Files” option of the Windows Explorer that’s included with Windows XP. In Windows 2000, I was able to say find “Bubba” and it would go and search every file in the directory that I told it to. Since I work with text files that can be named .HTM, .HDM, .WML, or even .ASP, I was a perturbed to find that when I did a similar task in XP, it only look at .TXT files and sometimes .HTM files. Well, perturbed was an understatement, as I chased my tail for almost five hours looking for a particular Title tag in a WML file, but that’s another story.

Anyway, I stepped up to the Usenet archive at Google groups and Lo! I found a simple solution and even an explanation:

In Windows XP, every file type that you have in the registry has some options associated with it. Open regedit and take a look at HKEY_CLASS_ROOT – you’ll find a whole list of file extensions under this key. If you don’t see the one that you’re looking for, you probably haven’t tried to open the file before; in Explorer, use the File Options window to add your extension type. Anyway, for arguments sake, lets say you are working with WML files and you’ve double-clicked it and told Windows that Notepad was opening these files. You’ll see the following:

HKEY_CLASS_ROOT\.WML | (Default) = “autowml”

There’s another entry for autowml elsewhere in the registry that tells Windows what application you will use to open these types of files – yay – but that’s not our concern. The fact is that there needs to be another key under this HKEY_CLASS_ROOT\.WML entry that tell Windows XP which “filter object” it should use, while using “Find in Files”. If you look at the entry for .TXT, you will find what you need – I won’t make you look, though! To allow “Find in Files” to use a “text method of searching” for your .wml files, do the following:

  • Add a new KEY under .WML called:

  • Change the (Default) value for this key to be:

  • Reboot

That’s it! Now when you do a search in Windows Explorer, wherever a .WML file is, it will search like a text file is. Useful? You better believe it. And of course, it’s now time for the canned legal-ease: I thought I would share this little tip to other fellow Geeks for the “common good” (particularly against the marketing buffoon that made the whole concept of “let’s use filters” appear in XP in the first place). Also, please insert any obviously required disclaimers about you doing this at your own risk and isn’t responsible for any mishaps of any kind, etc., etc., etc. – it’s just common sense to me, but some people seem to think it’s required… good luck with it!

2 thoughts on “Find in Files Fix in XP”

  1. I realize this post is from 8 years ago but I happen to have the misfortune to _still_ be working on XP.

    Thank youuuuu

    My computer wasn’t searching inside of .sql files and I was pulling my hair out!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.