And the winner is.... Me! It was a close run thing but I finally managed to almost get Windows Vista Search to search for the files that I wanted instead of the files that it wanted. I’m not a big fan of Vista. There are many new features that are very useful but I absolutely hate a change in any user interface because it destroys my productivity. I can never see why new features cannot be added on instead of having to undo what I already know. Microsoft often state that backwards compatibility is of huge importance but whereas I am pro-Microsoft I rarely find evidence to support this. If this is true then I have to conclude that they are just not trying hard enough.
I don’t mean to rant but as this is my first ever post where I have been critical I am hoping that the rarity of this event lends it some credence.
However, back to the point. The point is that Windows Vista Search is the emporor’s clothes. It takes someone to stand up and say "the emporor is naked" and that someone is me. Why can’t it just do what I ask it to ? Why does it have to show off and try to be clever and find files that have nothing to do with what I was looking for ? Why don’t developers and designers understand that whenever you add a feature that tries to be helpful to one person then it is instantly unhelpful to someone else.
What I want seems such a simple thing. Sigh. I want to search for .cs files that contain a given string. Windows XP’s search lets me do this (once it has been fixed to allow me to search for .cs files
). The solution in Vista is to understand that your search string can contain qualifiers (there is an excellent post on advanced search techniques here
). So if you type "*.cs" (don’t include the quotes) you get all manner of files that you don’t want (*.cs, *.csproj, *.csproj.Filelist.txt, *.cs.dll). However, if you type "ext: .cs" then you get much closer to what you want. This gives you *.cs files and *.csproj files. So far I haven’t found any way to tell Vista to give me only what I have asked for and not any other item it may care to think I might possibly be interested in (if any one knows where the "Just do what I ask for" check box is please let me know). However, this point is mostly rendered moot because whatever I would be searching .cs files for usually will not turn up in a .csproj file as well so by virtue of their differences the winner is finally me. I confess that Windows Vista Search comes a close second though because I still don’t know how to exclude .csproj files.
So to search for "override" in *.cs files type "override ext: .cs" into the search text box.
Oh, and whilst I’m at it, there is no option to go straight to the Advanced search. You have to search for something before it will give you the chance to do an Advanced search. The emporor is still naked.