DOS Command Format
Microcomputer/DOS Tutorial


Computer Studying

Navigation
{NavForms}

Virus Tutorial Map
Tutorial Map

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).

If you type C\:> FILENAME

DOS will look for: FILENAME.COM or FILENAME.EXE or FILENAME.BAT

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 Syntax

Each 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,

DIR d:pathname\filename.ext /p /w

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:

FILE? = FILE1 or FILED etc.

The * represents any group of characters:

*.* = Any file and extension

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.

Keep Reading Simple Commands


{NavBar}
Home | Products | Definitions | Newsletter | Virus Tutorial | Contact


FILExt is proudly hosted by DewaHost.com - a fast and reliable host for everyone!
DewaHost offers premium Web hosting starting from $8.95/month and a high speed file hosting service FileBurst!

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.