Searching in Windows Vista, Part 1

Secrets of the Search box

By Dave Johnson

I still remember my first computer, a Commodore Amiga with a seemingly spacious 10 megabytes of storage. It was easy to manage the few dozen files I stored there, since I could arrange everything in a handful of folders. Finding the right file was never more than a few clicks away, even if I didn't really know where to look. Ah, those were the days.

Today, my computer has a 250-gigabyte hard disk that is home to thousands of important files—including digital photos, videos, and music. (Just 30 seconds of video from my daughter’s piano recital would fill that old Amiga to capacity!) I bet your computer is much the same. Every year, hard disks get bigger and cheaper, encouraging all of us to store more stuff on our computers, not less. The result? Good luck tracking down your vacation photos from 2003.

And if you ask me, the search tools in Windows XP didn’t make things any easier. It always bugged me that in a typical folder with hundreds of files, there was no easy way to zero in on the specific file I wanted. Instead, I searched in Windows in kind of the same way I try to find my car keys around the house—by looking randomly and haphazardly until I finally find them underneath the cat.

In this column, I’ll tell you how to quickly locate personal documents, pictures, and other files using the Search box. For more tips on searching, be sure to check out Part 2 of the series, in which I talk about using search tools in the Start menu and Control Panel.

Never lose your files again

Windows Vista solves the keys-under-the-cat problem by baking a powerful, comprehensive, new search system right into the operating system. This means that no matter where you are in Windows—the Start menu, Control Panel, or any open folder, you can start typing and get immediate search results.

The glue that makes all this possible is a little something called the index. Here’s what happens: Windows constantly keeps track of all your files and stores information about them in the index. When you search for something, Windows doesn't need to slowly search your entire hard disk (like Windows XP had to do), because it already has a summary of all your stuff in its index. Your results pop up right away.

For me, this means something very important: I now search all the time. It’s simply faster to use the Search box to find a file in a folder than it is to browse the folder haphazardly. So while I used to search for files only occasionally, now I search for stuff every single time I turn on my computer.

In this column, I’m going to start with my favorite way to search in Windows Vista: using the Search box at the top of every folder. And check back for future columns, where I’ll talk about the other ways to search, such as using the Search folder, where you can do really fancy searches, as well as using the Search box on the Start menu.

Expose your files with the Search box

You can find the Search box in the upper right corner of every folder. Try this: Open the Documents folder by clicking the Start button Picture of the Start button and then clicking Documents. Click in the Search box and start typing your search term.
Picture of the Search box
The Search box

You'll start to see results as soon as you begin to type. There's no need to press ENTER, because, for example, when you type the letter C, the folder automatically filters out all the files that don’t match—so you’ll see just the files that have the letter C at the beginning of a word. If you add the letter A, the folder again snaps into action, showing file names with words that begin with CA. The files could be about cars, California, or small cats. If you keep typing, the results will get more and more focused and accurate. And the results pile up fast—just about as fast as you can type.

Picture showing how results are filtered as you type in the Search box
As you type in the Search box, all the files that aren't related to your search term disappear from view

What really excites me about the Search box is that it’s searching for a lot more than just file names, which makes it easy to find stuff when you don’t remember what a file is called. In addition to the file name, your search includes the file's other properties, such as the author, the type of file (such as text, spreadsheet, or digital picture), and any tags you've added to the file. Tags are short, descriptive phrases you can attach to some kinds of files. I add tags to all of my digital pictures, for example, so if I type "vacation" in the Search box, I’ll see all my vacation photos, no matter what file names those pictures have. To learn how to add tags to your files, see Add tags or other properties to files.

Picture of the Tags field in the Details pane
The Tags box in the Details pane

Search your file contents!

I saved the best for last: Searches now meticulously scour the contents of your document files. So if you type "invoice" in the Search box, you’ll see all the files that have the word "invoice" somewhere inside the document itself.

Think about it: You can now search for a file based on words or phrases that you wrote in the document itself, rather than on some file name you probably don’t remember. If you created a Microsoft PowerPoint presentation about scuba diving, for example, you can find it instantly by searching for a unique term that appears on one of the slides, like "decompression" or "wetsuit."

Try this at home

Whew—that’s a lot of ways the Search box helps you track down your files. Here’s a list of the most common and useful properties that the Search box scans during each search:

Property What it is How to use it in the Search box

Kind of file

What it is

A broad description of the file's format or content. Most of your files fall into one of these kinds: Document, Picture, or Music.

How to use it in the Search box

To find all of your MP3, WMA, and OGG music files, type Music. You can also type Documents, Pictures, or Email.


Type of file

What it is

A more specific indication of the file's format. The three or four characters that follow the period in the file name are called the file name extension and identify the file type. Common types include DOC (Microsoft Word document), XLS (Microsoft Excel spreadsheet), JPG (JPEG image), and MP3 (a standard digital audio format).

How to use it in the Search box

If you type an asterisk followed by a period and the file name extension, you’ll find all the files of that type. If you want to find only MP3 files, for example, type *.MP3.



What it is

Words or phrases you add to your files to describe them.

How to use it in the Search box

Type any word or phrase to see a list of files that have that tag. To try this out, open the Pictures folder, double-click Sample Pictures, and then type landscape to see sample pictures with that tag.



What it is

The name of the person who created the file.

How to use it in the Search box

Type the name of the author to see a list of files by that person.


Date Modified

What it is

The last date that your files were edited.

How to use it in the Search box

Type Modified: 3/22/2006 to find files modified on that date. You can also type just the month and day (Modified: 3/22), or even just the year (Modified: 2006).



What it is

Any text that appears inside a document, such as a text file, spreadsheet, or PowerPoint presentation.

How to use it in the Search box

Type any word or phrase. You’ll see a list of files that have that text somewhere in the document.

Get better results

Remember that the Search box only looks through the files that are in the current folder (including all the subfolders in that folder). So if you don't find what you're looking for, you might have started in the wrong folder. If you are looking for an e-mail message from Frank, for example, you won’t find it by searching in the Documents folder. You should type "Frank" in the Search folder (which you can find by clicking the Start button and then clicking Search on the right.) We’ll talk more about that in another column.

And don't forget that there are other ways to use the Search box to fine-tune a search. You can combine special terms like AND, OR, or NOT with your search terms for more precise results. If you type Picture AND baby, for example, you’ll only find files that include both of those words—such as digital pictures with the tag "baby," or documents that have both "picture" and "baby" in the contents. For more information about that, be sure to read Tips for finding files.

What gets me jazzed about searching these days is that I get almost instant results whenever I need to find a specific file. I type one or two words in the Search box, and moments later I see exactly what I need. If only finding my keys were this easy. Time to go look under the cat.

About the author

Picture of columnist Dave Johnson

Dave Johnson is a writer on the Windows team at Microsoft. In addition to writing about Windows, he's a scuba instructor, a drummer, an award-winning photographer, and the author of over three dozen books.

Have a comment for this columnist? Enter your feedback using the tool below. (You'll see the comment box after you click one of the buttons.) Note that although the columnist will read your feedback, personal replies are not possible due to the volume of feedback received.