Most people are familiar with the
*
character. Typing
Dir S*.TXT
at the command line locates every
text file in the current directory that begins with an S. However, you can use the
*
in any location. For
example, typing
Dir *S*.TXT
at the command line would locate any text file that contains an S in any
part of its name. Likewise, typing
Dir *S.TXT
would locate any text file that contains an S at the end
of its name. You can also use the
*
for the file extension. Typing
Dir S.*
locates any file with S as a filename,
but with any file extension.
The
?
is far more selective than the
*
and many people fail to recognize its value. For example, typing
Dir S??.TXT
at the command line will locate any text file with three characters in its filename that
begins with the letter S. Consequently, this command will locate
SUB.TXT
and
SUN.TXT, but not
SUBST.TXT or RUN.TXT (notice that even though RUN.TXT contains three letters, it doesn??™t begin with an
S). Like the *, you can use the ? wildcard character anywhere in the filename. For example, you can type
Dir *.EX? to locate both compressed and uncompressed executable files in the current directory.
Pages:
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852