Freigeben über


Another Bad Where? Day

Sometimes I stop and wonder if I'm having one of those "more-senile-than-usual" moments. Did I click the wrong button, or have I forgotten to set some weird option before I started the process that looks like it will still be running when I get up tomorrow morning? What on earth am I trying to do that is so complicated a 2.27 GHz Quad Core Xeon E5520 running 64-bit Windows 7 can't achieve while I'm still awake?

So why not try it for yourself? Open Windows Explorer, select drive C: in the folder tree, and type the full name and extension of some file you know exists into the Search box at the top right of the window. A good one to try, if you have Microsoft Office installed, is Default.dotx. Then wait. Or go to bed. On my machine it was still searching after 10 minutes and hadn't found it yet. Now open your C:\Program Files (x86)\Microsoft Office\Office14\1033\QuickStyles folder (or some similar path depending on the version of Office you have installed). Gosh - there's a file named Default.dotx. But would you know to look there?

Where all this started was looking for a specific template file we use here at p&p. I know the file name - but after watching the pulsating green crawly thing in the address bar on my machine for more than 20 minutes, with the search still running and no sign it found the file, I opened another instance of Windows Explorer and started to look in the folders where I thought it would be. Needless to say, it wasn't. Not even in the elusive QuickStyles folder. Maybe I should just reinstall the tools that the template is part of with logging enabled on the MSI, and then read the log file to see where it gets put? Not exactly an interactive approach to searching...

In fact, the interactive approach I took was to write a simple search utility in VS 2010 to search all files and subfolders starting at a specified folder for a specific file based on the full name or a standard partial-match search string (such as " *.dotx" or "myfile?.* "). I actually got it finished and working before the search had finished. It found the file I wanted in the C:\Users\[me]\AppData\Roaming\Microsoft\Templates\ folder in 12 seconds. And the time taken to search all of 40 GB of files on drive C: was less than 30 seconds.

Yes, I know the Windows 7 search is doing clever stuff like looking inside files and looking at metadata. And I know you can change the options from the Organize menu in Windows Explorer (though it seemed to make little difference). And I know I should better organize where I put files that I want to be able to find again. OK, so Windows 7 does seem to be more predictable when searching than Vista was (see Having A Bad Where? Day). But, sometimes, all you need is to find a file that you know is in there somewhere...