Bill Tudor

Weblog

  Home  |   Contact  |   Syndication    |   Login
  49 Posts | 0 Stories | 95 Comments | 0 Trackbacks

News

Copyright © Bill Tudor

Archives

Post Categories

Monday, November 02, 2009 #

One of the things I have always hated was “Windows Search”. Why the heck would I need “instant results” – instant as in donating countless CPU cycles and disk churns to background indexing operations running all day long on my box? YUK! I am never actually “looking” for something – I know where everything is. It’s right where I put it. Who are these people “looking” for things on their computers all the time?

Typical Scenario

My typical use case came up again this morning: I downloaded a source distribution from Google Code, and decided to check the files into my local SCM system (sidebar: this project is not taking any patches). Before doing this, I would like to delete all of the hidden “.svn” folders that came down with the distro. “Search for all folders named .svn”. Now keep in mind that I am not actually looking for the folders, as I know where they are (there is one folder named .svn in each of the folders in the distribution). I simply want to find them so I can control-A (select all) and press the delete key. You see what I mean.

Trouble with Windows Search

I always have trouble with Windows Search. I start typing “.svn” and immediately my file display window changes and I get a bunch of wrong answers – files with the letters “svn” in them (dot being ignored), sometimes files with “svn” inside of them, as well as virtually all of the files inside the folders, since many contain .svn extensions. Great. Hundreds of results when I was expecting around ten. What happened to the good old days when “find files” actually did what I wanted!

Read the Manual

Read the manual. For the first time, I decided to read the manual. I found a page at microsoft.com with the search syntax. For my scenario:

kind:folder .svn

The dot “.” is still ignored, and you get all folders – not just folders with “svn” in the name. Hmm. A little more digging. . .

kind:folder name:.svn

Now I am getting just the folders named “.svn”, but I am still getting folders named “svn” (no dot), as well as any folder with “svn” in the name. Hmm.

kind:folder name: “.svn”

That did it. The dot is still being ignored, despite the quotes, but it is not a wildcard in some sort of pseudo-regular expression. The documentation says that * and ? are the wildcard characters, taking on their typical meanings. There’s plenty of syntax for AND, OR, greater or less than (for things like dates and sizes), and virtually any property you can think of – in or out of the file(s).

Maybe I’ll spend some more time looking over the documentation. Maybe not. At least I can now find a bunch of folders to delete. The next time I’m looking for a MSWord document containing the phrase “place contract”, the word “lease”, and was edited within the last 3 days, created by “mydomain\joe”, and last saved by “otherdomain\mike” – I’ll know how to do it. Thanks, Microsoft.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati