Using Wildcards

[OnLine Home Page]    [WNCC Home Page]    [Douglas Campus]    [Fallon Campus]


(NOTE: You can use the "Print" button on your browser to print a copy of this document!)

About the only confusing part of this unit is the use of wildcards. Wildcards substitute for any single character or any group of characters, depending on which wildcard is used. In general, a "?" substitutes for any single character. It can be anywhere in the search string, and more than one can be used in any particular search. Very handy when you can't remember exactly what you called a file. For instance, if you do a search for LETTER?.DOC, the results would include any seven character filename beginning with LETTER that has a DOC extension. LETTER1.DOC and LETTERA.DOC would turn up in the search, while LETTER18.DOC (eight characters in filename), LETTER.DOC (only six characters in filename), and LETTER.WPD (wrong extension) would not.

The other wildcard is the asterisk. You know, the star, "*". It stands for any number of characters in any combination, taking effect from where it's at to either the dot in the filename, or if the wildcard is located in the extension, from where it's at to the end of the extension. For instance, a search using MT*.* would turn up any file whose filename started with MT, regardless of length or extension. You could limit the results to a particular type of file by specifying the extension: MT*.DOC. This would return all the .DOC files of any length beginning with MT.

Wildcards can have an interesting effect on your results when you search. The best way to see what these effects are is to do a little fooling around with your Student Data disk. Put the disk in the floppy drive, and then use "Find" to perform searches for the following:

            1.  men         2. *men         3. men*         4. m?n         5. m*n

Note the differences in the results, and see if you can figure out why. When you can, you've got this part nailed.