Yesterday, I was trying to find a file on my new Windows XP laptop. The file had a nasty inline SQL statement that I wanted to find and correct. I took a part of the SQL statement (for example "fun.banks_id *=banks.banks_id") that I thought would be distinct and used XP's search function to find the file. That was a mistake.XP couldn't find it. (I was shocked. Though I guess I should not have been.)

But the file was there. Someone else found it using good old grep in cygwin. Why couldn't XP find it. I could find it from my Win2K box after all...
A quick google search and I found the reason. XP excludes searching for files with specific file extensions. This includes files with extensions of:
.asp
.c
.cpp
.css
.h
.hpp
.js
.log
.pl
.xml
.xsl
.aspx
.cs
.html
This is a problem because I am a developer. I need to search for content in these files. I run Windows XP Pro and not XP Home. It stands to reason that I might actually want to search these files. And not skip over them. I am using the [sic] 'Enterprise' edition after all.
Microsoft is kind enough to have a band-aid for the problem. Problem is it involves registry updates and applying some patches. In other words, it's a real old fashioned Microsoft hassle. Thanks, for nothing. It doesn't even seem to fix searching for all files.
The really funny thing is that Finder on my Mac has no problem finding this file. Plus it finds it much faster. About the same speed as using grep under cygwin. Spotlight also skips over some development files. But that can be easily fixed, and the Finder's search function doesn't exclude after all.
While I am in Windows land, I'll be running grep instead of the XP Search tool.
No comments:
Post a Comment