<s>
COMMAND.COM	B-Operating_System
is	O
the	O
default	O
command-line	O
interpreter	O
for	B-Language
MS-DOS	B-Application
,	O
Windows	B-Application
95	I-Application
,	O
Windows	B-Device
98	I-Device
and	O
Windows	B-Device
Me	I-Device
.	O
</s>
<s>
It	O
has	O
an	O
additional	O
role	O
as	O
the	O
usual	O
first	O
program	O
run	O
after	O
boot	O
(	O
init	O
process	O
)	O
,	O
hence	O
being	O
responsible	O
for	B-Language
setting	O
up	O
the	O
system	O
by	O
running	O
the	O
AUTOEXEC.BAT	O
configuration	O
file	O
,	O
and	O
being	O
the	O
ancestor	O
of	O
all	O
processes	O
.	O
</s>
<s>
COMMAND.COM	B-Operating_System
'	O
s	O
successor	O
on	O
OS/2	B-Application
and	O
Windows	B-Device
NT	I-Device
systems	O
is	O
cmd.exe	B-Device
,	O
although	O
COMMAND.COM	B-Operating_System
is	O
available	O
in	O
virtual	O
DOS	O
machines	O
on	O
IA-32	B-Device
versions	O
of	O
those	O
operating	B-General_Concept
systems	I-General_Concept
as	O
well	O
.	O
</s>
<s>
The	O
filename	O
was	O
also	O
used	O
by	O
(	O
DCP	O
)	O
,	O
an	O
MS-DOS	B-Application
derivative	O
by	O
the	O
former	O
East	O
German	O
VEB	O
Robotron	O
.	O
</s>
<s>
The	O
compatible	O
command	O
processor	O
under	O
FreeDOS	B-Application
is	O
sometimes	O
also	O
named	O
FreeCom	B-Application
.	O
</s>
<s>
COMMAND.COM	B-Operating_System
is	O
a	O
DOS	O
program	O
.	O
</s>
<s>
Programs	O
launched	O
from	O
COMMAND.COM	B-Operating_System
are	O
DOS	O
programs	O
that	O
use	O
the	O
DOS	B-Application
API	I-Application
to	O
communicate	O
with	O
the	O
disk	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
As	O
a	O
shell	O
,	O
COMMAND.COM	B-Operating_System
has	O
two	O
distinct	O
modes	O
of	O
operation	O
.	O
</s>
<s>
The	O
first	O
is	O
interactive	B-Application
mode	I-Application
,	O
in	O
which	O
the	O
user	O
types	O
commands	O
which	O
are	O
then	O
executed	O
immediately	O
.	O
</s>
<s>
The	O
second	O
is	O
batch	B-General_Concept
mode	I-General_Concept
,	O
which	O
executes	O
a	O
predefined	O
sequence	O
of	O
commands	O
stored	O
as	O
a	O
text	O
file	O
with	O
the	O
.BAT	O
extension	O
.	O
</s>
<s>
Internal	O
commands	O
are	O
commands	O
stored	O
directly	O
inside	O
the	O
COMMAND.COM	B-Operating_System
binary	O
.	O
</s>
<s>
COMMAND.COM	B-Operating_System
is	O
not	O
case-sensitive	O
,	O
meaning	O
commands	O
can	O
be	O
typed	O
in	O
any	O
mixture	O
of	O
upper	O
and	O
lower	O
case	O
.	O
</s>
<s>
CHDIR	B-Application
,	I-Application
CD	I-Application
Changes	O
the	O
current	B-Application
working	I-Application
directory	I-Application
or	O
displays	O
the	O
current	B-Application
directory	I-Application
.	O
</s>
<s>
COPY	B-Device
Copies	O
one	O
file	O
to	O
another	O
(	O
if	O
the	O
destination	O
file	O
already	O
exists	O
,	O
MS-DOS	B-Application
asks	O
whether	O
to	O
replace	O
it	O
)	O
.	O
</s>
<s>
(	O
See	O
also	O
XCOPY	O
,	O
an	O
external	O
command	O
that	O
could	O
also	O
copy	B-Device
directory	O
trees	O
)	O
.	O
</s>
<s>
CTTY	O
Defines	O
the	O
device	O
to	O
use	O
for	B-Language
input	O
and	O
output	O
.	O
</s>
<s>
DEL	B-Device
,	I-Device
ERASE	I-Device
Deletes	B-Device
a	O
file	O
.	O
</s>
<s>
When	O
used	O
on	O
a	O
directory	O
,	O
deletes	B-Device
all	O
files	O
inside	O
the	O
directory	O
only	O
.	O
</s>
<s>
In	O
comparison	O
,	O
the	O
external	O
command	O
DELTREE	O
deletes	B-Device
all	O
subdirectories	O
and	O
files	O
inside	O
a	O
directory	O
as	O
well	O
as	O
the	O
directory	O
itself	O
.	O
</s>
<s>
DIR	B-Device
Lists	O
the	O
files	O
in	O
the	O
specified	O
directory	O
.	O
</s>
<s>
ECHO	B-Application
Toggles	O
whether	O
text	O
is	O
displayed	O
(	O
)	O
or	O
not	O
(	O
)	O
.	O
</s>
<s>
EXIT	B-Device
Exits	O
from	O
COMMAND.COM	B-Operating_System
and	O
returns	O
to	O
the	O
program	O
which	O
launched	O
it	O
.	O
</s>
<s>
LFNFOR	O
Enables	O
or	O
disables	O
the	O
return	O
of	O
long	O
filenames	O
by	O
the	O
FOR	B-Language
command	O
.	O
</s>
<s>
LOADHIGH	O
,	O
LH	O
Loads	O
a	O
program	O
into	O
upper	B-Device
memory	I-Device
(	O
in	O
DR	B-Application
DOS	I-Application
)	O
.	O
</s>
<s>
MKDIR	B-Application
,	I-Application
MD	I-Application
Creates	O
a	O
new	O
directory	O
.	O
</s>
<s>
PATH	O
Displays	O
or	O
changes	O
the	O
value	O
of	O
the	O
PATH	O
environment	O
variable	O
which	O
controls	O
the	O
places	O
where	O
COMMAND.COM	B-Operating_System
will	O
search	O
for	B-Language
executable	O
files	O
.	O
</s>
<s>
RENAME	B-Device
,	I-Device
REN	I-Device
Renames	B-Device
a	O
file	O
or	O
directory	O
.	O
</s>
<s>
RMDIR	B-Device
,	I-Device
RD	I-Device
Removes	O
an	O
empty	O
directory	O
.	O
</s>
<s>
TIME	B-Device
Display	O
and	O
set	O
the	O
time	B-Device
of	O
the	O
system	O
.	O
</s>
<s>
TYPE	B-Device
Display	O
the	O
content	O
of	O
a	O
file	O
on	O
the	O
console	O
.	O
</s>
<s>
VER	B-Device
Displays	O
the	O
version	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
VERIFY	O
Enable	O
or	O
disable	O
verification	O
of	O
writing	O
for	B-Language
files	O
.	O
</s>
<s>
:label	O
Defines	O
a	O
target	O
for	B-Language
GOTO	B-Application
.	O
</s>
<s>
FOR	B-Language
Iteration	O
:	O
repeats	O
a	O
command	O
for	B-Language
each	O
out	O
of	O
a	O
specified	O
set	O
of	O
files	O
.	O
</s>
<s>
GOTO	B-Application
Moves	O
execution	O
to	O
a	O
specified	O
label	O
.	O
</s>
<s>
PAUSE	O
Halts	O
execution	O
of	O
the	O
program	O
and	O
displays	O
a	O
message	O
asking	O
the	O
user	O
to	O
press	B-Error_Name
any	I-Error_Name
key	I-Error_Name
to	I-Error_Name
continue	I-Error_Name
.	O
</s>
<s>
On	O
exit	B-Device
,	O
all	O
external	O
commands	O
submit	O
a	O
return	B-Application
code	I-Application
(	O
a	O
value	O
between	O
0	O
and	O
255	O
)	O
to	O
the	O
calling	O
program	O
.	O
</s>
<s>
Most	O
programs	O
have	O
a	O
certain	O
convention	O
for	B-Language
their	O
return	B-Application
codes	I-Application
(	O
for	B-Language
instance	O
,	O
0	O
for	B-Language
a	O
successful	O
execution	O
)	O
.	O
</s>
<s>
If	O
a	O
program	O
was	O
invoked	O
by	O
COMMAND.COM	B-Operating_System
,	O
the	O
internal	O
IF	O
command	O
with	O
its	O
ERRORLEVEL	O
conditional	O
can	O
be	O
used	O
to	O
test	O
on	O
error	O
conditions	O
of	O
the	O
last	O
invoked	O
external	O
program	O
.	O
</s>
<s>
Under	O
COMMAND.COM	B-Operating_System
,	O
internal	O
commands	O
do	O
not	O
establish	O
a	O
new	O
value	O
.	O
</s>
<s>
Batch	O
files	O
for	B-Language
COMMAND.COM	B-Operating_System
can	O
have	O
four	O
kinds	O
of	O
variables	O
:	O
</s>
<s>
Before	O
DOS	O
3	O
COMMAND.COM	B-Operating_System
will	O
only	O
expand	O
environment	O
variables	O
in	O
batch	B-General_Concept
mode	I-General_Concept
;	O
that	O
is	O
,	O
not	O
interactively	O
at	O
the	O
command	B-Device
prompt	I-Device
.	O
</s>
<s>
These	O
variables	O
are	O
defined	O
solely	O
within	O
a	O
specific	O
FOR	B-Language
statement	I-Language
,	O
and	O
iterate	O
over	O
a	O
certain	O
set	O
of	O
values	O
defined	O
in	O
that	O
FOR	B-Language
statement	I-Language
.	O
</s>
<s>
Under	O
Novell	O
DOS	O
7	O
,	O
OpenDOS	O
7.01	O
,	O
DR-DOS	B-Application
7.02	O
and	O
higher	O
,	O
COMMAND.COM	B-Operating_System
also	O
supports	O
a	O
number	O
of	O
system	O
information	O
variables	O
,	O
a	O
feature	O
earlier	O
found	O
in	O
4DOS	B-Application
3.00	O
and	O
higher	O
as	O
well	O
as	O
in	O
Multiuser	B-Operating_System
DOS	I-Operating_System
,	O
although	O
most	O
of	O
the	O
supported	O
variable	O
names	O
differ	O
.	O
</s>
<s>
Because	O
DOS	O
is	O
a	O
single-tasking	O
operating	B-General_Concept
system	I-General_Concept
,	O
piping	B-Operating_System
is	O
achieved	O
by	O
running	O
commands	O
sequentially	O
,	O
redirecting	O
to	O
and	O
from	O
a	O
temporary	B-Application
file	I-Application
.	O
</s>
<s>
COMMAND.COM	B-Operating_System
makes	O
no	O
provision	O
for	B-Language
redirecting	O
the	O
standard	O
error	O
channel	O
.	O
</s>
<s>
This	O
is	O
an	O
undocumented	O
feature	O
in	O
COMMAND.COM	B-Operating_System
of	O
MS-DOS/PC	O
DOS	O
5.0	O
and	O
higher	O
.	O
</s>
<s>
It	O
is	O
also	O
supported	O
by	O
COMMAND.COM	B-Operating_System
of	O
the	O
Windows	B-Device
NT	I-Device
family	I-Device
as	O
well	O
as	O
by	O
DR-DOS	B-Application
7.07	O
.	O
</s>
<s>
All	O
versions	O
of	O
DR-DOS	B-Application
COMMAND.COM	B-Operating_System
already	O
supported	O
a	O
similar	O
internal	O
function	O
utilizing	O
an	O
exclamation	O
mark	O
(	O
!	O
)	O
</s>
<s>
instead	O
(	O
a	O
feature	O
originally	O
derived	O
from	O
Concurrent	B-Operating_System
DOS	I-Operating_System
and	O
Multiuser	B-Operating_System
DOS	I-Operating_System
)	O
-	O
however	O
,	O
in	O
the	O
single-user	O
line	O
this	O
feature	O
was	O
only	O
available	O
internally	O
(	O
in	O
built-in	O
startup	O
scripts	O
like	O
"	O
!	O
DATE	O
!	O
TIME	B-Device
"	O
)	O
and	O
indirectly	O
through	O
DOSKEY	B-Device
's	O
$T	O
parameter	O
to	O
avoid	O
problems	O
with	O
!	O
</s>
<s>
4DOS	B-Application
supports	O
a	O
configurable	O
command	O
line	O
separator	O
(	O
4DOS.INI	B-Application
CommandSep	O
=	O
or	O
SETDOS	O
/C	O
)	O
,	O
which	O
defaults	O
to	O
^	O
.	O
</s>
<s>
COMMAND.COM	B-Operating_System
in	O
newer	O
versions	O
of	O
Windows	B-Device
NT	I-Device
also	O
supports	O
an	O
separator	O
for	B-Language
compatibility	O
with	O
the	O
cmd	B-Device
syntax	O
in	O
OS/2	B-Application
and	O
the	O
Windows	B-Device
NT	I-Device
family	I-Device
.	O
</s>
<s>
(	O
cmd	B-Device
,	O
however	O
,	O
does	O
not	O
support	O
the	O
¶	O
separator	O
.	O
)	O
</s>
<s>
Generally	O
,	O
the	O
command	O
line	O
length	O
in	O
interactive	B-Application
mode	I-Application
is	O
limited	O
to	O
126	O
characters	O
.	O
</s>
<s>
In	O
MS-DOS	B-Application
6.22	O
,	O
the	O
command	O
line	O
length	O
in	O
interactive	B-Application
mode	I-Application
is	O
limited	O
to	O
127	O
characters	O
.	O
</s>
<s>
The	O
message	O
"	O
Loading	O
COMMAND.COM	B-Operating_System
"	O
can	O
be	O
seen	O
on	O
a	O
HUD	B-Application
view	O
of	O
the	B-General_Concept
Terminator	I-General_Concept
and	O
the	O
internal	O
viewport	O
of	O
RoboCop	B-Application
when	O
he	O
reboots	B-Device
.	O
</s>
<s>
In	O
the	O
computer-animated	O
children	O
's	O
TV	O
series	O
ReBoot	B-Device
,	O
which	O
takes	O
place	O
inside	O
computers	O
,	O
the	O
leader	O
of	O
a	O
system	O
(	O
the	O
equivalent	O
of	O
a	O
city	O
)	O
is	O
called	O
the	O
COMMAND.COM	B-Operating_System
.	O
</s>
