Wildcards

Many windows tools and utilities support using wildcards in file names. Here are the wildcards supported by Windows:

 screenshot

An example using *

Let's say you have a lot of Word documents with long names. You are staring at the Word open file dialog. You would like to see all the documents which contain the word "letter".

Just enter this wildcard expression in the file name field and press enter:

*letter*.doc

Then the dialog will (temporarily) only show you documents which match the wildcard expression above. The expression above means:

"Show me all documents which start with zero or more characters (any characters), continue with the word letter followed by zero or more characters (any characters), and with the extension .doc

An example using ?

Let's say you have several files on your disk:

file1.txt

file2.txt

file3.txt

file35.txt

Let's say we use this wildcard file name:

file?.txt

The ? matches a single character. The wildcard file name above means "match any filename which starts with file, is followed by a single character, and then the .txt extension follows".

This wildcard will select:

file1.txt

file2.txt

file3.txt

... but it will NOT select:

file35.txt

because it has two characters, instead of one, between file and .txt.

But if you specify the wildcard:

file??.txt

then only

file35.txt

will be selected, because the wildcard file name specifies that there must be 2 characters between file and .txt