Exploring Vista's Advanced Search

I used the file search function in Windows XP a lot, particularly to find groups of files. But the XP search syntax doesn't work in Vista. Vista uses the Windows Desktop Search query syntax. Which means

   "*.vbproj;*.csproj"

becomes

   "ext:(*.vbproj OR *.csproj)"

Vista's search box in Windows Explorer

Note that the boolean operator must be in all-caps to work. That was painful to figure out.

I highly recommend reading through the Windows Desktop Search advanced query reference. First of all, it's completely different than searching in XP, so you'll need to retrain your brain. But it's also a far richer search paradigm than we ever had in XP. And you can use the same CTRL+E search keyboard shortcut that works in your browser to harness its power in Windows Explorer.

When you perform a search, note that the Search Tools menu is available; that's our main interface for all the new search options.

vista-search-tools.png

From here, you can bring up the Search Pane, which lets you filter your searches to particular file types, and includes an expandable Advanced Search pane.

vista-search-pane.png

As you fill in values in the Advanced Search pane and click Search, the equivalent query terms will be populated in the CTRL+E search box. It's a good way to learn basic search syntax. Once you've learned the new Vista search syntax, you won't need the Search Pane training wheels any more; you can press CTRL+E and type in what you want. It's Google-icious.

There's also an important distinction between indexed search locations and non-indexed search locations. To see the difference, choose "Search Options" from the Search Tools menu.

vista-folder-search-options.png

Most notably, your search terms will only extend to file contents in indexed locations. I'm also very glad to see search now ignores compressed files by default. This was a real pain in XP, which insisted on digging through 600 megabyte ZIP files as a part of any search.

To view indexed locations, or add your own, select Modify Index Locations from the Search Tools menu. On a default Vista install, there are only three indexed locations:

  • Offline Files
  • c:Program DataMicrosoftWindowsStart Menu
  • c:Users

There is one big caveat here: the full-text indexer only indexes file extensions that it understands. To view or modify the list of file extensions the indexer understands, click the Advanced Options button on the Modify Index Locations dialog, then select the File Types tab.

Vista indexes, advanced options button, file types tab

Perhaps the coolest new search feature is that you can enter searches directly from the Windows start menu. Try it. Hit the Windows key and just start typing search queries. There's nothing to install, nothing to configure, searching just works in Vista. It's about time.

Read more

Stay Gold, America

We are at an unprecedented point in American history, and I'm concerned we may lose sight of the American Dream.

By Jeff Atwood · · Comments

The Great Filter Comes For Us All

With a 13 billion year head start on evolution, why haven't any other forms of life in the universe contacted us by now? (Arrival is a fantastic movie. Watch it, but don't stop there - read the Story of Your Life novella it was based on

By Jeff Atwood · · Comments

I Fight For The Users

If you haven't been able to keep up with my blistering pace of one blog post per year, I don't blame you. There's a lot going on right now. It's a busy time. But let's pause and take a moment

By Jeff Atwood · · Comments

The 2030 Self-Driving Car Bet

It's my honor to announce that John Carmack and I have initiated a friendly bet of $10,000* to the 501(c)(3) charity of the winner’s choice: By January 1st, 2030, completely autonomous self-driving cars meeting SAE J3016 level 5 will be commercially available for passenger

By Jeff Atwood · · Comments