Search

Thursday 12 September 2013

WILDCARDS CHARACTERS (PC T1 Q3)

Wildcards are characters that can be used to stand-in for unknown
characters in file names. In card games, a wildcard is a card that can match
up with any other cards. In DOS, wildcard characters can match up with any character
that is allowable in a file name. There are two wildcards in DOS:
 1. * = matches up with any combination of allowable characters
 2. ? = matches up with any single allowable character
1. The asterisk character, *, can stand in for any number of characters.
    example of this command
:
c:\>del *.doc
This command would delete every file with the doc extension
from the root directory of C: . So files like 
myfile.doc, testfile.doc, and
123.doc 
would all be deleted.
2. The question mark wildcard, ?, stands in for any single character.
    example of this command:
C:\>del ?.doc
This command would only delete files that had a single character
filename and a 
doc extension from the root directory. So a file like
a.doc or 1.doc is history, but a file like io.doc is perfectly
safe, since it has two characters.



No comments:

Post a Comment