<< Previous    1...   18  19  20  21  [22]    Next >>

 

 

Using *.* (star-dot-star)

The most popular wildcard is the wildcard*.*, which is pronounced star-dot-star.  It means everything, all files, no matter what their name (but usually not directories).

Since star-dot-star matches everything you should be careful when using it.

The COPY *.* command copies all files in the directory.

The DEL *.* command is deadly, it ruthlessly destroys all files in the directory.

The REN command with *.* is tricky.  You must specify a wildcard as the second part of the REN command, you cannot give every file in the directory the same name.  Here's an example:

C> REN *.DOC *.WP

In this example, all files with the DOC extension are renamed to have a WP extension.  That's about the most you can do with the REN command and wildcards.

The extension is normally used to identify file types, for example, whether a file is a word processing document or a spreadsheet.  Here are some common file extensions:

 

BAK                              A copy of a data file as a backup

 

BAT                              A special type of program, a batch file

 

COM                             A command program or command file (program file)

 

DBF                              A database file

 

DOC                             A document or word processing file

 

EXE                              An executable file or another type of program

 

FON                             A font file

 

GRA                             A graphics file

 

PIC                               A picture file

 

SYS                              A system file

 

TXT                               A text file

 

WKS                             A worksheet file

                                                 

 Of course, the list goes on and on.  None of this is etched in stone anywhere, so feel free to give a file whatever extension you want - save for the dreaded COM, EXE or BAT extensions (which are covered in "Significant Filenames" later in this chapter).

Some programs supply their own extensions automatically, you simply type in the first part of the filename, and the program adds the rest as it creates or loads the file.

You can enter a filename in upper or lowercase; DOS doesn't care.  The DIR command displays filenames in uppercase.


<< Previous    1...   18  19  20  21  [22]    Next >>