Wildcard Characters

Windows Assistance

Go To
Home
Windows XP
Virus Info Center
Windows Web Sites
Windows XP Books
Tips From The Past
Searching For
Commentary
Microsoft Security Bulletins
eMail
About This Site
Search Me


Advanced Search

Search The Web


Advanced Search

 

Search Using Wildcard Characters


What are Wildcard Characters? 

Wildcard characters are used to narrow down a search for files or folders in Windows.  Before you use either of the wildcard characters you should search using what part of a name you do know. see below

What If I . . . ?

If at any time you feel Windows has got you stumped then repeat the matra "What if I . . . ?" and then try it. Sometimes it works and sometimes it don't. Even the don't work results is a good results only not the one you desired. When you stop thinking 'What If I . . .' then Windows has defeated you. Do you really want a bunch of ones and zeros to better you? I think not.

The Wildcard Characters in Windows

Windows uses two wildcards: The asterisk [*] wildcard takes the place of any number of characters, from zero characters up and the question mark [?] wildcard replaces any single character.

Using The Asterisk [*] Wildcard

Rule for the Asterisk

The asterisk takes the place of any number of characters, from zero characters up.

Examples: 

  • win* will return any files or folders whose name starts with win
  • *ows will return any files or folders whose name ends with ows.
  • *w*  or  w will return all files or folders that have a w anywhere in the name.
  • win*.*s returns any files or folders whose name  starts with win and has a file extension that ends with a s.
  • win*.s* [must have the asterisk] returns any files or folders whose name starts with win and has a file extension that starts with a s.
  • *dows will return all files or folders whose name ends with dows.
  • win*ows will return all files or folders  whose name starts with win and ends with ows.

note: Because of the way file associations work, the rules for wildcards will work in ways that appear to be counter to what has just been shown. That's Windows. I suggest you use the Advanced tab in the Find [Search] utility to search using a specific file extension.

Using The Question Mark [?] Wildcard

Rule for the Question Mark

The question mark [?] wildcard replaces any single character.

Example:

  • h????g will return any files or folders whose name has h????g anywhere in the name. For instance it could return both hiking and thanksgiving.

Using Both Wildcards In A Search

You can use both wild characters in a Find, in any order, any number of times. Just remember the question mark represents one character and the asterisk represents zero to many characters.

Windows Default Search Method

Windows defaults to the broadest possible search when you don't use wildcards at all. For instance:

ndo

will find any file or folder that has ndo anywhere in the file or folder name.

Remember, in Windows you use wildcards to narrow your search. This is unlike DOS where wildcards are used to widen the search.