CMD.EXE Compatibility Variables

Print Topic  Return to Overview  Previous Topic  Next Topic 

CMD.EXE has some built-in variables (i.e., which are treated as environment variables but which do not exist in the environment):

 

CD - the current directory (see also _CWD).

 

CMDCMDLINE - the command line that started the command processor.

 

CMDEXTVERSION - the command extensions internal version number.

 

DATE - the current system date (see also _DATE).

 

RANDOM - a random number between 0 and 32767 (see also @RANDOM).

 

TIME - the current system time (see also _TIME).

 

TCC supports all of these built-in variables.  (In TCC, CMDEXTVERSION will always return 2.)

 

The variables below are used by some Microsoft command processors, but are ignored by TCC. To see their usage by Microsoft and the alternate methods to achieve the same purpose in TCC, review:

 

COPYCMD

CMD.EXE default options for COPY command

DIRCMD

CMD.EXE default options for DIR command

 

Topic "cmd_execompatibilityvariable.htm" last edited 1/27/2008. ©2008  JP Software, Inc.
Keywords: CMD.EXE