The CLI in Windows

The CLI in Windows

Sections: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Index | Next >

Internal and External Commands

Learning objective: Explain the difference between internal and external commands


Click on image to enlarge.

In DOS, there are several types of commands. They are internal and external commands. Internal commands have not varied much since DOS 2X. External ones have. We can see the evolution of commands by their extensions and scope. External commands tend to be more powerful than internal commands but at a cost of being stored on disk.

Internal commands

Internal commands are DOS commands embedded into cmd.exe shell. They are always available to the user and tend to focus on file and folder commands. An example of a internal command would be "CLS" to clear the screen.

External commands

External commands are not located in the shell but are in program files stored on disk. They are a combination of .exe and .com files mostly found in the \windows\system32 folder. An example of a external command would be "MORE.COM" to pause the output of a command. .com files are limited to 64K memory mapping. .exe files are more extensive and can also include header information and icons too. Most executable files today are .exe files. (See links for more detailed information on these file types.)

Succession of commands

When a DOS command is entered at the command prompt, there is a succession of commands if the extension is not given. If you enter a command like "ZZ" (not a real command), the system will see if it is an internal command. If it is not found it will see if there is a "ZZ.COM" file. If not, it will see if there is a "ZZ.EXE". If not it will see if there is a "ZZ.BAT", and if not any of these, an error message will be given. Thus, internal? .com? .exe? .bat? error.

Thinking: Why not make all commands internal commands?

Key terms: external commands, internal commands, succession of commands

Resources:
To maximize your learning, please visit these Web sites and review their content to help reinforce the concepts presented in this section.

Quick links:
What is difference between internal and external command? @ Answers.com
What’s the difference between the COM and EXE extensions? @ MSD
Difference between .com, .exe, and .bat? @ StackOverflow
COM file @ Wikipedia

Embedded Resources

Notes on navigation: Click inside the frame to navigate the embedded Web page. - Click outside the frame to navigate this page to scroll up/down between the embedded Web pages. - Click on the frame title to open that page in a new tab in most browsers. - Click on the the "Reload page" link to reload the original page for that frame.

What is difference between internal and external command? @ Answers.com | Reload page | If frame is empty, click on the link to view the page in a new tab or window

What’s the difference between the COM and EXE extensions? @ MSD | Reload page | If frame is empty, click on the link to view the page in a new tab or window

Difference between .com, .exe, and .bat? @ StackOverflow | Reload page | If frame is empty, click on the link to view the page in a new tab or window

COM file @ Wikipedia | Reload page | If frame is empty, click on the link to view the page in a new tab or window

Sections: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Index | Next >