Friday, October 12, 2007

Internal Commands

Continued in Everything about DOS...

COMMAND.COM is the filename of the default operating system shell (or command line interpreter) for DOS and 16/32bits versions of Windows (95/98/98 SE/Me). This file is loaded during the boot process, which means that COMMAND.COM is resident in memory at all times, and the commands that it understands are available to the user at all times It also has an additional role, as the first program run after boot, hence being responsible for setting up the system by running the AUTOEXEC.BAT configuration file, and being the ancestor of all processes.

As a shell, COMMAND.COM has two distinct modes of work. First is the interactive mode, in which the user types commands which are then executed immediately. The second is the batch mode, which executes a predefined sequence of commands stored as a text file with the extension .BAT. Its function as the default command interpreter is analogous to that of the Unix shells, although COMMAND.COM's functionality is considerably more limited than that of its Unix counterparts.

cmd.exe is COMMAND.COM's successor on Windows NT/2000/XP/2003 and OS/2. COMMAND.COM is also available on those systems to provide compatibility when running DOS applications. On NT systems, COMMAND.COM is run within the Virtual DOS Machine.


A command that is stored in the system memory and loaded from this file COMMAND.COM is known as INTERNAL COMMAND.

As I told in my earlier post in the series, all commands are run only after the Enter key is pressed at the end of the line. COMMAND.COM is not case-sensitive, meaning commands can be typed in either case and are all equivalent (so dir, DIR and DiR will all work in the same way).

List of Internal Commands

Here are all of the 62 Internal Commands contained within the COMMAND.COM command interpreter:

break

buffers

call

cd

chcp

chdir

choice

cls

copy

country

ctty

date

del

device

devicehigh

dir

dos

drivparm

echo

erase

errorlevel

exist

exit

fcbs

files

for

goto

if

include

install

lastdrive

lh

loadfix

loadhigh

md

menucolor

menudefault

menuitem

mkdir

move

not

numlock

path

pause

prompt

rd

rem

ren

rename

rmdir

set

shell

shift

stacks

submenu

switches

time

truename

type

ver

verify

vol



Some of these internal commands (e.g. dir, cd) are meant to be executed from the command line, or within a batch file, which is what we think of as a command. Others (e.g. files, switches) are generally used within a configuration file like CONFIG.SYS to help configure your system. Because both CONFIG.SYS and AUTOEXEC.BAT use commands that are found in COMMAND.COM, they must load later in the boot process.


************************************************************
If you like what I write, you may want to subscribe to my Blog Feed

0 Comments: