Windows NT's mad crazy command interpreter. For some reason wasn't good enough for them anymore, so they introduced some incompatibilities and made CMD.exe. Now we can all use 20 year old batch files on our brand new quad Xeon NT server.

CMD.EXE is windows NT/2000/XP's 32-bit command interpreter.
In order to add new features, and yet keep compatibility with NT 3 and windows 3.1, it was decided to use a completely new program, and keep for running batch files that expected to be running on earlier operating systems.

CMD.EXE is similar to the windows 95 shell, in that it properly supports long filenames. 'CD "My Music"' works fine in CMD.EXE, but under COMMAND.COM, you must know the short file name. NT doesn't use the same scheme for producing short file names as 9X, and depending on how NT is set up, there might not even be one. dir /x will show short filenames in

Like in windows 95, CMD.EXE responds to close requests properly. Clicking the close button on a CMD.EXE window will exit cleanly, while a COMMAND.COM window will ignore it, and NT will ask for permission to terminate the process.

CMD.EXE can resolve UNC paths straight from the command-line with no hacks. 'c:\>\\server1\scripts\install.bat', for example. Windows 9x requires that a drive letter be inserted - 'c:\>c:\\server1\scripts\install.bat'. This behaviour is probably intended to add UNC support to legacy programs, as many DOS programs don't bother checking for \\s in their paths. CMD.EXE can perform tab completion of UNC paths once a \\server\share has been typed in.

Improvements over 95 include features borrowed from unix tab completion, pushd, findstr (a GREP clone), improved scripting commands (FOR, SETLOCAL, &&, || etc.) and various NT-specific commands (CACLS, COMPACT, etc.).

For help with CMD.EXE commands, see 'command reference', and 'new features in Windows 2000, command differences' in windows help, or type 'help' on the command line. See also: tab completion for how to enable it under 2000.

Log in or register to write something here or to contact authors.