In reality, cmd.exe is a Windows program that acts as a DOS-like command line interpreter. It is generallycompatible, but provides extensions which address the limitations of COMMAND.COM:
SETLOCAL/ENDLOCAL commands limit the scope of changes to the environment
internal CALL andGOTO labels lessen the need for individual batch files to perform parts of a task.
filename-parsing extensions to the SET command are comparable to C shell.
anexpression-evaluation extensions is also provided in the SET command.
an expansion of the FOR command to support parsing files and arbitrary sets in addition to filenames.
use ofarrow keys to scroll through command history (provided by DOSKey in COMMAND.COM)
off-by-default path completion capabilities similar to bash tab completion
a directorystack accessible with the PUSHD and POPD commands
IF can perform case-insensitive comparisons and numeric equality and inequality comparisons in addition to case-sensitivestring comparisons
the ability to escape reserved characters by using the caret character (^)
The extensions can be disabled, providing a stricter compatibility mode.