Wild cards are symbols that let you reference groups of related files. As in card games, wild cards take on any value. DOS wild cards are the "*" and "?."
The Asterisk (*)
The asterisk takes the value of any number of characters; for example, if you typed in:
dir xyz*
XYZ, XYZABC and XYZ3 would be selected.
To delete all files with a TXT extension, type:
del *.txt
To delete all the files in the current directory, type:
del *.*
The Question Mark (?)
The question mark matches any single character. For example,
?ABC would find 1ABC, 2ABC and XABC. Note that
*ABC is not valid for this.
To copy CHP files that begin with CO, type:
copy CO*.CHP a:
To list files that begin with CO and have an extension that begins with D, type:
dir CO*.D*
Tip!
The dot is a shortcut for *.*. The following commands both copy all files to the B drive:
copy *.* b:
copy . b: