|
DOS commands are issued at the prompt C:\>. Whatever you type after that prompt that is not in the COMMAND.COM standard library is assumed to be the name of a file on the default disk and DOS will search for it under one of three names (in the order listed).
The first is a command file (note the COM extension). The second is an execution file (EXE extension). And, the third is a batch file (a series of DOS commands in a text file which you'll learn about later in this tutorial). The first file found will be read into memory and the command processor will start the program running. Both .COM and .EXE files execute as programs. The difference between the two relates to how memory is allocated and certain parameters in the computer are set. Command SyntaxEach DOS command has a mandatory part and some have an optional part. Presented here, the mandatory parts will be shown in bold CAPITAL LETTERS and the optional parts in lower case. For example,
is the complete command for a disk directory. Note that only DIR is necessary. You may note the term pathname in the above command. The pathname is the full descriptive name to any location on the disk. It includes the names of all directories (see subdirectories later in this section). In some commands you may use wildcards. A wildcard, like the joker in a card deck, can stand for any character or group of characters. The ? represents any single character:
The * represents any group of characters:
Use caution with wildcards. They can be dangerous with commands that do things like erase files. Also, in some cases a wildcard formulation can be misleading. The combination AP*EX.COM does not mean all files that start with AP and end with EX in their root name and with a COM extension. It means all files starting with AP and having an extension of COM. The EX is meaningless as it is ignored because of the asterisk. |
Please use the contact
form for questions or comments about this web site.
Copyright © 2001
Computer Knowledge, All Rights Reserved
Pray the Rosary for peace.