Image Image Image Image Image Image Image Image Image Image

Winextra | April 24, 2014

Scroll to top

Top

10 Comments

Windows 7 Search – wildcards and search codes

Windows 7 Search – wildcards and search codes
Steven
  • On May 4, 2010
  • http://www.winextra.com
This is the third in a series of posts about Windows 7 Search with some of the information that is available in Windows 7 – The Missing Manual written by David Pogue.

I’ve never been much of a sophisticated searcher either on the web or the desktop. Much of the time I just plug in the word or phrase I want to search for and let the platform do its things. I also know that for almost as long as there has been search of any kind there has been boatloads of trick that you can use to return better results, I just never seem to remember them or want to go hunting for them at the time I am searching for something.

I do know that in previous versions of Windows there were some tricks you could use while searching your files; but it seems that with Windows 7 they have stepped up the game a little with all kinds of ways to improve your search.

Wildcards

This option has been with us since the earliest days of DOS and Windows and consists of two wildcards: ‘?’ and ‘*’ (without the single quote marks). The simplest explanation to what the two different wildcards do boils down to this: the ‘?’ means one character appears here and the ‘*’ can stand for any number of characters – letters or numbers.

So if you are using the ‘?’ and you are searching for a file that you know part of the name of your query could look like this fo??t which would return any file that started with fr and ended with a ‘t’ but only had two unknown letters in the middle. In this case the file foxit could be one of the search results.

When using the ‘*’ as part of the search term it is best to use it either at the beginning of the word – *it – or in the middle – f*t – in either case the file named foxit would be returned as part of the results. As for using the ‘*’ wildcard at the end of the search term there isn’t much of a point because Windows search always acts like there is a wildcard at the end.

Search Codes

The one thing about the way I usually end up doing searches is that I typically end up with way more results than I really need. The way around this happening is to use search shortcuts – or codes – to further refine what you are searching for.

The simplest of these is the document types short codes. For example you are searching for a specific image but you forget its name but remember that it is a JPEG (jpg) image. In this case you can use the following short codes to refine your search

ext: .jpg
fileext: .jpg
extension: .jpg
filextension: .jpg

Another handy option as well is the ability to search by tags. Tags are typically single word descriptive terms that you can add to some files that find all the files that contain that tag. For example – tags: mom, birthday – would return all images, sound files, videos, or Word documents that have those two tags. It is important to note that not all files support tagging but they are increasing over time.

Another way to refine your search especially in regards to file contents is the use of quotes where you are looking for something that is a phrase. For example let’s say you are looking for documents that have DNA sequence in them. In order to find the documents with that exact phrase just wrap the phrase in quotes like this “DNA sequence” and only documents with that phrase will be returned, otherwise all the documents with DNA and sequence will be returned.

Finally we have what is called boolean searches and this style of searching also goes back to the very beginnings of using computers. Boolean searches boil down to the use of three different comparative keywords – AND, OR and NOT, which must be capitalized in order to work properly.  Using these boolean terms you can create some really complex search queries but that kind of in depth usage is beyond the scope of thins post (and to be honest probably my ability to explain it properly which would be a disservice to you the reader) however some simple usage might be a long these lines.

AND – using this boolean between your search terms will tell Windows Search to return all files that contain those words e.g.: mom AND birthday will return all the files that have both mom and birthday in them. You can also further refine the search by placing multiple terms in parentheses like this – (mom AND birthday) AND (dad AND stupid). In this case only files that included mom and birthday but also included dad and stupid would be returned.

OR – using this boolean will return all the files that have either of the two words in them e.g.: mom OR birthday will return files that contain the word mom or the word birthday in them. As with the AND boolean keyword you can create even more refined search by using combinations of the boolean keywords so you could have something like this (mom AND birthday) OR (dad OR stupid). This would return documents that contain both mom and birthday as well as files that contain dad or stupid.

NOT – this is a great boolean keyword to have available as it lets you tell your search to not return results that contain specified terms e.g.: mom NOT birthday will return all the files containing the word mom in it but will eliminate any results that contain the word birthday in it

Last but not least

As handy as these little tips might be they only scratch the surface of the different ways you can improve your search results as there are still some more search criterion that you have access to in Windows. The following is a sampling of the most commons that you might find useful.

name: if you are only looking for a file rather than including searching its contents you can use this criterion to restrict the search to just filenames – name: mom

created: you can find files that were created on a specific date – created: 7/25/10 will return only those files created on July 25, 2010

received: let’s say you were looking for a specific email but you can only remember that you received it at some point last week or earlier. By using two periods ‘..’ between two dates your search will return only the emails you received between those dates – received: 3/1/2010..3/15/2010

size: by using something like size: 2gb only the files of that size will be listed in your results. Also as with the received: example you can use the two periods to return the files between a size range – size: 2GB..10GB

<> qualifiers: let’s say you wanted to find all the files less than a certain size. In this case you could use a search term criterion like this size: <2GB which would return all the file smaller than 2 GB

rating: a quick and dirty way to list all the songs that you have given a rating to would be something like this rating: >**** which would return all the songs (or videos) with a rating of four or five.

The range of criterion that are available to you to use in searches is over 100 and covers everything from file size to camera flash rate. If you want to know the full range of criterion available first right click on the column heading in Explorer and then on the More… menu item in the right click context menu

Then from the Choose Details dialog you will be able to see all the criterion available for searches. Now not all of them will be usable as criterion but at last count 115 were usable so there will be some trial and error involved in finding out which ones will work for now. If I come across a complete criterion list I’ll update this information.

Hopefully now you’ll know a little bit more about how to do some fancy search ninja moves and if not I still have a few more posts to come about Windows 7 Search that might get you there.

Comments

  1. William Vincent

    Jeesus…just seems to me that they’ve made it unbelievably complicated. I shouldn’t have to take a 10-hour class to learn to do what XP did with a 2 minute learning curve. Search seems to me to have been horridly crippled. For instance, my Win7 machine seems totally unwilling to apply any search to a drive other than C:. Gone is ‘search’ function for right-click menus. I have 5 drives, so that simply won’t do. Also: I do a search for a ‘fast file’, a filetype I work with. I enter “.ff”. It throws up 6 files that START with “ff”.

    Fail.

    • Bill the solution to add the advanced search to your other drives is extremely simple (refer to the first post in series http://www.winextra.com/archives/windows-7-search-index-not-your-daddys-search-index/ )

      It’s actually very simple. There are two primary ways to add new folders for the indexer to keep an eye on. The easiest way is in Explorer to drag the folder and drop it into any one of the Library folders. I said it was simple.

      Now the second way will also allow you to remove folders from the index but first open up the Indexing Options dialog and the absolute simplest way is to open the Start Menu and start typing indexing until you see Indexing Options show up in the list. click on it and then click through to the Indexed Locations dialog.

  2. William Vincent

    Jeesus…just seems to me that they’ve made it unbelievably complicated. I shouldn’t have to take a 10-hour class to learn to do what XP did with a 2 minute learning curve. Search seems to me to have been horridly crippled. For instance, my Win7 machine seems totally unwilling to apply any search to a drive other than C:. Gone is ‘search’ function for right-click menus. I have 5 drives, so that simply won’t do. Also: I do a search for a ‘fast file’, a filetype I work with. I enter “.ff”. It throws up 6 files that START with “ff”.

    Fail.

    • Bill the solution to add the advanced search to your other drives is extremely simple (refer to the first post in series http://www.winextra.com/archives/windows-7-search-index-not-your-daddys-search-index/ )

      It’s actually very simple. There are two primary ways to add new folders for the indexer to keep an eye on. The easiest way is in Explorer to drag the folder and drop it into any one of the Library folders. I said it was simple.

      Now the second way will also allow you to remove folders from the index but first open up the Indexing Options dialog and the absolute simplest way is to open the Start Menu and start typing indexing until you see Indexing Options show up in the list. click on it and then click through to the Indexed Locations dialog.

      • Benderrodriquez22

        So here is the schnizel on indexing, I work in an office where 36 other people save to a series of servers. Indexing is not allowed on external drives because they have a different platform, an if you could index the server, it would need to re-index 1000 times a day to keep up. OMG I just realized that Microsoft has become AI, there isn’t anyone living there! They are all clones! AHHHHHHH!

        • pcunite

          ha ha … scary huh? give filesearchex a try. It is probably what you’re looking for.

  3. Uuddd

    Nevertheless W7 search is a piece of shit

  4. geej

    i am looking for files that have the word planet surrounded by quotes eg. “planet” i also have files that the word planet concatenated eg hq_planet/moon1 i only want the files with quoted planet eg “planet” . all files exist in a directory that is indexed and the files in question are added as plain text filter. so what search bar syntax do i use ?

  5. frustrated

    This article is false. ? and * do the same thing. Using either seems to be treated as the “AND” operator — for example, a search for “a*b” (without quotes) will find files named “ab.txt” and “b-otherstuff-a.txt”. Same with a search for “a?b” and “a AND b”

    Where did you come up with this information?

  6. So, YEARS LATER. Windows 8.1 is out here, and Windows Search is still deeply broken. And its even worse, since the Start Page search only searches in apps, or files, or whatever, not all.

    Just to mention: There is no operator “AND” in AQS. AND is implied, or something.

    Here’s some mind-boggling AQS examples:

    file:M gives all files with M in the name, anywhere

    file:M* same thing. Hmm.

    file:”M*” likewise. Huh?

    HOWEVER

    file:M*. finds only files that STARTwith M. Woah.

    Also:

    file:M*.* and all combinations in quotes.

    FURTHER

    file:M*E gives only files that START with M, and contain an E, somewhere after the M. Not what we expected from the above!

    file:M*EXE starts with M, then contains EXE, somewhere after

    file:”M*E” gives files that start with M, and END with E (including the extension, if present) Wow, also not what the previous results suggested!

    BUT

    file:M*.EXE gives files that END with .EXE.

    Adding the period invokes magic that makes WS look for an extension at the end. Well, that’s kinda nice… looking out for us, in a way.

    BUT

    file:M*.EXE* also finds only files that END with .EXE

    AMUSINGLY

    file:”M*.EXE*.TXT” will find this file, for example:

    “My File with .exe in name.txt”

    So will

    file:”M*EXE*TXT”

    BUT

    file:”M*.EXE*TXT” WILL NOT FIND IT!

    Now try combining things like filetype: or other properties. LOL. And forget using OR. It never combines elements (with implied AND) like you’d hope. Unless you are lucky.

    Thanks!

Submit a Comment

Leave a Reply