MS/DOS Commands

Basic Format
A basic MS-DOS command consists of three separate parts.

  • The first part is the keyword. Since it identifies the command, it can also be called the command name.

  • The second part is one or more parameters; they tell DOS what drives, directories, or files the command should work on.

  • The third part is one or more switches; they tell DOS which variations of the command you want.


      Using Function Keys to Correct or Repeat a Command

      If you make a mistake entering a command, but you notice it before you press the [Enter/Return key], you can just backspace and correct it.

      If you press the [Enter/Return key] before you realize you made a mistake, DOS will display an error message that indicates something is wrong with your command. One way to correct this is to enter the entire command again in its corrected form. However, you can also use two of the Function keys to help you correct a command. If a command is lengthy, using one of these keys is usually more efficient than entering the entire command again.

      • The F3 Key - If, for example, you press the F3 key after you get an error message from DOS, all of the characters from the last command that you entered appear at the new prompt. Then, you can backspace and make the required corrections. You can also use this key if you want to repeat the execution of a command.

      • The F1 Key - If you press the F1 key after you get an error message from DOS, the first character of the last command appears at the new prompt. If you press the F1 key again, the second character appears, and so on. Then, you can continue to press the F1 key until you reach the part of the last command that needs to be corrected. When you reach that point, you can make the necessary correction and type the rest of the command.

      Two Types of DOS Commands

      When you use DOS, you should realize that there are two types of commands: internal commands and external commands. Although DOS is always able to find and execute its internal commands, you sometimes need to tell DOS where to find its external commands.

      • Internal commands. DOS stays in the internal memory of your systems unit whenever your PC is turned on. This portion of DOS is called resident DOS. It includes the command processor and also includes many of the DOS commands.

        • The commands that are a part of resident DOS are known as internal commands. Because they are always in internal memory, DOS always knows where to find them.

          Also, it does not have to load them from disk storage into internal memory before it can execute them. To use one of these commands, all you ever have to do is enter the command name at the command prompt.

          Example of internal commands are:

      • External commands. If a command isn't in resident DOS, it's called an external command. Each of these commands is stored in a disk file called a command file.

        On a MS-DOS system, the names of command files always have an extension of COM or EXE. Usually, these command files are stored in the DOS directory on one of the drives of your PC.

        • Before DOS can execute an external command, it must find the command file for the command and load the command into internal memory. But not all systems are set up so DOS is able to find its external commands.


      Example Commands