Windows

Take advantage of Search filters in Windows Explorer

In this edition of the Windows Desktop Report, Greg Shultz shows you how to use and take advantage of the Search filters built into the Windows 7 Explorer Search Box.

I recently received an email from a reader who was frustrated with the Search feature in Windows Explorer. His complaint was that the Search feature is good in Microsoft Windows 7, but it always turns up too many results, so it is hard to find exactly what he wants.

Of course, I agree that the Search feature built in to Windows 7 is great. However, it also has a terrific Search filtering system built right in to Windows Explorer's Search box, of which he was unaware. Unfortunately, it is very easy to overlook the Search filters feature if you aren't looking for it.

In this edition of the Windows Desktop Report, I'll show you how to use and take advantage of the Search filters built in to Windows Explorer's Search box in Windows 7.

This blog post is also available in PDF format in a TechRepublic download.

The Search box

Let's begin with an overview of the Search box, which appears in the upper-right corner of Windows Explorer, as shown in Figure A. When you begin typing text in the Search box, it immediately begins sifting through the search index for that text in folder names, file names, the contents of the file, and in file properties. It then displays the results in Windows Explorer.

Figure A

The Search box appears in the upper-right corner.
For example, I typed Invoice in the Search box in the Documents Library and instantly turned up 653 items, as shown in Figure B.

Figure B

The Search process is fast and efficient.

As you can imagine, manually weeding through 653 files to the find the ones that I want would be a very time-consuming task. Fortunately, I can use Search filters to do the work for me.

Using Search filters

By using Search filters you can quickly and easily narrow down the results and find what you are looking for. To access the Search filters, just click in the Search box and you'll see a drop-down menu that shows the Search filters in blue, as shown in Figure C. The filters that you see by default are actually context sensitive in that the filters that display are targeted to the content in that folder or Library. For example, in the Pictures Library, one of the default filters is Date Taken.

Figure C

The Search filters will appear at the bottom of the Search box.
Returning to the Invoice search example, when I want to find an invoice from an exact date, I select the Date Modified filter and I see a calendar, as shown in Figure D, where I can select a date or date range to narrow down my search. If I wasn't sure of the exact date, I could select one of the predefined filters such as Earlier This Year or Last Week.

Figure D

The Date Modified filter provides you with a calendar where you can select a date or date range.
You can even combine filters by selecting one and then clicking the Search box again and selecting a second one. For example, I combined the Date Modified filter with the (File) Type filter, as shown in Figure E.

Figure E

You can combine filters to more thoroughly narrow down your search results.
If while you are composing a search, you decide that you want to clear out the current filters and start again, just click the close button in the far-right corner of the Search box, as shown in Figure F. When you do, the filters will be removed from the Search box and the display will return to normal.

Figure F

Click the close button to clear the filters.
If you want to save the Search so that you can use it again in the future, just click the Save Search command that appears in the Command Bar. Once you save a Search, it will appear in the Favorites list, as shown in Figure G, where you can easily run the Search whenever you need it. If and when you no longer want the saved Search, just right-click on it and select the Remove command.

Figure G

Once you save a search, it is added to the Favorites list in Windows Explorer.
Stay on top of the latest Microsoft Windows tips and tricks with TechRepublic's Windows Desktop newsletter, delivered every Monday and Thursday. Automatically sign up today!

Custom Search filters

As I mentioned, as soon as you begin typing text in the Search box, Search sifts through the index and displays results that contain that text in folder names, file names, the contents of the file, and in file properties. Fortunately, you can narrow your search by creating your own filters based on file properties.

For example, if you want to find only files that have Invoice in the file name, you can use the Name: filter, as shown in Figure H.

Figure H

You can create custom filters based on file properties.

If you wanted to find files that have Invoice in the Tag, you can use the Tag: filter by typing the following in the Search box:

Tag:Invoice

If you save links to Web sites in folders and now you want to find any links that contain the word Gates, you can use the Kind: filter by typing the following in the Search box:

Gates Kind:link

You can find a whole slew of these types of custom Search filters on Microsoft's Windows Search Advanced Query Syntax page.

Search Again

While Search filters can help you at the beginning of your search, there is another little-used feature called Search Again that can help you filter your results after your search. When you scroll to the bottom of the search results, you'll see a panel named Search Again that lists several additional locations, such as Homegroup or Internet. However, you'll also find a Custom button that brings up the Choose Search Location dialog box, which is basically a Browser that will allow you to pick and choose other locations, as shown in Figure I. When you click OK, your existing results are filtered down to the location that you selected.

Figure I

Using the Search Again feature allows you to filter your results after the fact.

What's your take?

Have you used any of these Search filtering tools? If so, what is your favorite feature? As always, if you have comments or information to share about this topic, please take a moment to drop by the TechRepublic Community Forums and let us hear from you.

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

40 comments
stebobibo
stebobibo

I want to know if you can make negative searches. What I mean is, can you make a query in the search bar to show youĀ results that do NOT contain that property? For example, I'm in a folder of dog photos and I want to notĀ see photos with the word "poodle" in their name. Is there a way to do that?

DonG43
DonG43

Nice article. I went to try it. In Public documents I click on search box and the only filters I get are date modified and size but your example shows Type and Author. Only in "my" documents can I get those.

n.champaigne
n.champaigne

If I can't find files in system and hidden folders, the search engine is damaged. I don't like to share, and I don't like to have pre-made folders to save documents to. Filters are not for user searches but for those persons sneeking about inside your system spying on you! Users know where they save files. Once again, If I am searching for something on my system, I am searching for stuff you can't find easily.

rpbert4
rpbert4

Still doesn't work. I've tried right click, left click inside the search box and the magnifying glass and the drop down arrow next to the magnifying glass Bob

rpbert4
rpbert4

I have Win 7 Pro. When I click in the search box (upper right) area I do not get a drop down with search filters. Am I missing something? I get a menu with Undo, Cut, Paste,etc and Right to Left reading order, etc and Open IME Bob

sdunnin
sdunnin

The more I play around with it the more useful I find it to be. It is waaay more useful than XP's search, which I found to be slightly better than useless. I Found 7's search a little frustrating at first when the searches returned in content view by default. I prefer details view where it is easier to sort and sift through the results. The other thing is I wish they would have made some of the advanced filters available via the search field in the GUI instead of having to remember what they are and type them in.

Dogcatcher
Dogcatcher

Search for content may be of great value to some people, but I use it maybe once a year. In contrast, a search for a filename is frequent. Therefore, the XP-style search is vastly superior for my work, and Vista/Win7 should have included 'classic search' as an option. A search of C:\ for '*.ini' returns no documents, even though C:\ is fully indexed. If you're reading this, you know there are gobs of ini files on C:\, so the problem is the search mechanism, not a lack of files. There is some relief from this nonsense, however. Instead of using the Explorer search box directly, press WindowsKey+F. That brings up a new Explorer window with expanded choices for search filters. You get drop-down lists for Kind, Date Modified, Type, and Size. Those are the biggies, and their presence saves remembering (and typing) another bit of search syntax. After you select a filter, such as 'Type=ini', additional relevant drop-down filter buttons appear. My experience may differ from the default because: - I disable content indexing on all drives. - I fully index the important drives. - I use the Windows Classic theme with Aero disabled.

Realvdude
Realvdude

After doing a little research inspired by this article, I found a new appreciation for the search feature. I believe it is based on Windows Search 4.0 http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresources/advquery.mspx To search for content with files use "content:" and your search criteria, which accepts advance search formatting like "content:((this OR that) AND other)". It also accepts "ext:" and "fileext:" to specify extensions, or you can just use the age old wildcard without the keyword like "*.txt". I also understand the frustration of feeling this search is dumbed down from XP, and wish that MS had at least included this advanced information in the context help.

LocoLobo
LocoLobo

If so does 7 index the whole drive? All drives? I don't know about 7 but in XP only a few locations are indexed. Including "Outlook Express" when I have specifically uninstalled express. Usually when I want to search in windows explorer a dialog appears telling me the folder isn't indexed. Would I like to try the old search. Most of my files are not kept in "My Documents" or the other locations indexed by "Windows Search". I have played with the indexing options in XP. Index the whole drive? That can work or it can be a nightmare of slowdowns. Remove useless folder indexing? That helps some, but I still hit the "folder not indexed" problem. So my question is, does W7 get around this by indexing everything? Or am I expected to keep my stuff in their specific document folders? How does this work in a business environment with network shares?

sylvrwulf
sylvrwulf

Index rebuilding is easy. I just had to do it for one of our employees for his outlook search to work. Win 7 has another wonderful serach tool built into the start menu. Click Start and type in whatever you are looking for (app, doc, etc) into the bottom blank, no more having to use menus or control panel! Type in Index. Second option on mine is index options. (if it doesn't come up because of the index problem, you can find it in the control panel.) You can go to advanced to delete the one you have and rebuild it. It will take time to reindex, so start it at night and let it run. And for those that are superstitious (the only word for it) of new OS's and all their "modern" features like libraries, you can add locations to index like your custom folders. I personally think its a terrible idea, but what do I know? Another option you can use is to "move" your library folder. I have another hard drive I use as "my documents" for easy backup and recovery. You open libraries by clicking "Start" and clicking on your name at the top right column. You can then right click on the library folder, go to properties, and 'move' it to a new location. This way it goes where you want it to and doesn't break any of the links in the OS. I was a huge WinXP user/fan, but Win7 is so superior I don't even like using XP mode. You feel more comfortable because it was around so long, but you seriously need to give 7 a chance. And I'm sure when the next OS comes out, we will be hearing the same cries about staying with 7 over the new one, classic IT forum whines.

joe
joe

Explorer errors out when I attempt to perform a search on an entire drive (C:\ for example) with "explorer has stopped working" or if I attempt a search for ".doc" in a particular folder it returns every file and folder that contains the letter "D".

isaac.yassin
isaac.yassin

After playing around with it I switched over to Everything (www.voidtools.com)

cally_laws
cally_laws

Having bought a bran new computer it was alredy loaded with window 7, before I had XP and explorer 6 never a problem Now Im so frustrated with all the 7 stuff why did Microsoft ever put out such a studid program that so hard to work out bring back XP please. some time back I tried explorer7 and tossed it out when the warrenty on the computer is finished Im relaoding XP as it very user freindly

ppascual
ppascual

This feature in Win 7 is higly dissapointing. After a very bad experience after losing a user account in win-xp, y donn't like to place my documents in a user library, that is a false-alias of something tied to Windows internal user layout(damn!), but to be workable, win7 search facility, only applies to user libraries, and this only if they are indexed. Score = 0 points.

pgit
pgit

So long as you don't use any proprietary apps that are not ported to Linux, you might want to give Linux a try. There's a virtual infinite array of how you can search in the base system, and if you use the KDE information management front end (kontact) the universe is at your fingertips. People who surf the web, do email, chat (including skype) browse the web can be as easily if not better served with Linux. Little things like search, doing backups and the like just plain work, are more robust/stable and of course are free. That said, there's some database behind the windows search (just like there is with Linux's "locate" command) but I don't know precisely what it's called. I assume it's under user settings for each user. Perhaps application data\microsoft somewhere. I have seen where this gets corrupted, or in some cases became inaccessible to the regular user. If I were you I'd try running a search as admin and see if you get better results. I'd also look into whether there is a windows command line tool for rebuilding the search database... again as there is in Linux. I've been having a lot of little let downs with win7. The patina has corroded; it's just another windows machine, with many of the same bugs and stupid limitations as all it's predecessors.

groon
groon

The sort of search functions described in this article (search by partial name, date, etc.) have been in Windows for over ten years. The only new features are the ability to search for author and a few other document properties. I'm sure some peple would find those features handy. However, the previous incarnations of Explorer's Search, from Windows 98 through to XP, included the extremely handy ability to search for text within documents. If I have a folder of 10,000 INF files, and I want to find which of them contain the text VEN_8086&DEV1234, I can search for *.inf files containing that text string, and have my answer in two seconds. Windows 7 does not offer that. The only time Windows 7 allows you to search contents of files is after the initial search, and at that point it merely offers to search your original search criteria. So, if I know I have an XML file, or HTML file, or TXT file somewhere on my hard drive that has a particular string in it, the only way I can find it in Windows 7 is to search *every* file for that string - first for the file name, and then for file contents. Sorry, but this is two steps back.

michael_boardman
michael_boardman

Or to be precise, in my case it just doesn't work. I bought W7 on release and thought the Search feature was excellent - until it just stopped working. From the Start button, it just produces two or three "blank" icons labelled (Documents, My Documents, and Microsoft Office Outlook) and no proper results. Occasionally, it will deign to produce ditto for Control Panel. The fixes I have found on the Internet don't fix it, nor does reinstalling or repairing W7 - several times by now. I know that's not what Mark's article is about - just by way of an introduction! The Search feature Mark discusses is better, but still unreliable. There have been times when it hasn't produced any result and, as a test, I have used F2 to copy and paste a file name into the Search box. W7 has the nerve to sit there and tell me that it can't find the file! This is not consistent - sometimes it will produce a proper result, and sometimes it won't. I've given up trying to fix it, and now rely on memory plus a sensible folder organisation, and in desperation I have a third party search tool I use. A big disappointment...

Mark W. Kaelin
Mark W. Kaelin

Have you filtered your Windows Explorer search results? Did you even know that filtering of search results was available?

stebobibo
stebobibo

@DonG43 It seams like the filters that come up automatically change. You can still use filters by just typing in the filter and putting a colon after it, eg "tags:".

Greg Shultz
Greg Shultz

...Windows Explorer. From the description you gave, you're in Internet Explorer. The Search filters do not appear in Internet Explorer, only in Windows Explorer.

krsmav
krsmav

Click on the magnifying glass at the right of the search box. The filter list will pop down.

LocoLobo
LocoLobo

I think the older search engine would let you search contents as well. But you had to specifically select the Advanced options then root around for it. Like you I find a filename search is sufficient most of the time.

michael_boardman
michael_boardman

It's all very comprehensive and laudable - but Search just doesn't work so unfortunately all this is redundant!!!

michael_boardman
michael_boardman

Index rebuild doesn't work on my system, so the Search won't either. Consequently, "Click Start and type in whatever you are looking for" is a non-starter.

pweegar
pweegar

Take a look at the link I posted in my other entry here. Here's a secret: In the search box, try using ext: doc or other file extension. As for the error message you get when doing a search for c:\ (which is basically just using the dir command from the command line) I wonder, how much memory do u have in your computer? Sounds like your running out of resources. for that matter, how much free hd space do you have?

jwronski
jwronski

Win7 Explorer has an annoying progress bar at the top saying it is searching, when all I want to do is open a folder. I thought the search from start menu was most valuable as I can't find my apps on the new start menu. Is Win7 as retarded as XP in a search that you can't limit it to exclude searching zip and tgz files?

the-one, a CPA
the-one, a CPA

I've got a similar problem...indexing and search has never worked for me and I've tried everything.

steve6375
steve6375

I have used Search on a local drive to search for string and is has returned no results even though I KNOW the file is there! This is repeatable. Also why are these features hidden? Why can't we have fields for extension, filename, contents, etc. Isn't that supposed to be what GUIs are for and why WIndows was invented in the first place? Why, when I stick in a DVD containing 1000 files, do I have to wait 5 minutes before I can access the DVD (and wait for the green progress bar). Generally I love Win 7, but the search/indexing/Explorer integration is PANTS!

Greg Shultz
Greg Shultz

...the search index is corrupted. If so, there has to be a way to fix it. I'll look into it and see what I can find.

Mark W. Kaelin
Mark W. Kaelin

Just to be clear, and not take credit for something I didn't do, the blog post was written by Greg Shultz. Greg writes an in-depth Windows tip every week we affectionately call the Windows Desktop Report.

RandyLyon
RandyLyon

I had a complex saved search of a library containing folders on different drives. Months later, I needed to add a criteria and the only way I could find was to rebuild the search from scratch. That's not so bad but I could not even display the original criteria so had to do all the design all over again. Now I keep note files for my complex searches. I'm sure there is a way to see a saved search criteria, but I can't find it. TIA

rpbert4
rpbert4

You're right! I figured that out yesterday and was going send that msg. out about it. Thanks! Bob

michael_boardman
michael_boardman

Not sure if this was a reply to my post, but in case it was, I have 4 gig of RAM (and it doesn't seem to matter how many other programs I have running), and 530 gig of HD space. Even by Windows' resource-hungry standards, I would have thought that was enough?...

pgit
pgit

Your towering intellect is awesome. I await the enlightenment of reason behind your elevated and most constructive proclamation here. Many here are reporting troubles with MS search 4.0. I have uninstalled it on every last XP machine I have ever laid hands on, many hundreds of machines. Every one of those users who occasion to use search have thanked me profusely. So we obviously have a problem here. I have a lot of users who collate tons of information they've gathered, they need quite advanced search functionality. The few I have set up with KDE4 and it's "semantic desktop" are getting massive mileage out of it. (eg I work for a couple published authors, incl one globe trotting chef) These people don't really know Linux from windows, all they know is "write document," "search google" "reply to email" and the usual end-user stuff. Linux serves them better than windows ever did, that's what THEY tell me. They can use the same search feature to find what they need in titles, in the content of documents of all sorts, in tags, in metadata, and any combination of the above. The semantic desktop also allows them to create 'virtual groupings' of materials as a basis for a given project. The same materials may be associated any number of ways with different projects or sets of information. It's not exclusive, like putting everything related into one folder, to the exclusion of other contexts. I have not found an equivalent in windows, at least not for free. There are some cool things like pinning a project to the task bar while working on it, but when it comes to being able to associate and more important FIND things swiftly among your data, (which is the topic of this thread, not your armchair assessment of my personality) nothing I have seen comes close to KDE4. I give my customers what they need. I will suggest Linux to some, a very limited few actually. For most windows is perfectly fine. So I am hardly a zealot, and you certainly can't construe as much from my previous post. My title was misleading, as I mentioned in another post I placed above: my point was the windows search uses some kind of database, and that often is somehow corrupted or inaccessible (permissions?) or whatever... the result being search not working well, or at all. You, if I may brazenly adopt your apparent outlook on life, appear to me to have been spared the rod when a child. Or to paraphrase you' "another rude, crass, self centered jerk speaks." But that would be unfair, as I don't really know you. For all I know your response was more informed by your girlfriend having just left you for a sanitation engineer, or your having been passed over for promotion to help desk yet again, or something likewise disconcerting happening in your life sometime prior to your reading these forums. You have my sympathies in any event. If it's a simple lack of maturity you either won't ever get it or you'll have a very hard, embarrassing and painful fall that enlightens and humbles you. That's universal. One who cannot humble themselves and abide the golden rule is currently in the position of "doesn't get it." Ergo my sympathies, as you are either bound for a hard fall or will be disliked by many of those around you, absent a good lesson in social interaction. My apologies in advance if I have you all wrong, but look at what you gave me to go on...

catseverywhere
catseverywhere

God forbid you have a network drive mapped at the "computer" level. I have to sit there for up to a minute staring at the drive icon I want to open, waiting for that progress bar to crawl across the address bar. I'd almost rather not see it. A visual reminder of someone's idea of "helping" my end users. Although this "feature" is ultimately helpful, my users don't see it that way. The number of "my computer is running slow" complaints is rising steadily in direct proportion to the replacement of XP machines with win 7.

pgit
pgit

That the search database is corrupted or maybe the permissions are out of whack. But since I titled it "you should try Linux" no doubt nobody read it. I suggested there has to be a command line fix for the search database, but I went looking (when I had a little time) and didn't find anything valid off hand. Please post as much as you can discover on this, how to build and repair the db and more important where the heck is it?! Might even warrant a new blog; "repair windows search."

Editor's Picks