The Windows CMD shell CMD.exe contains a number of 'internal' commands, additional 'external' commands are also supplied as separate executable files. External commands are generally stored in the C:\WINDOWS\System32 folder, this folder is part of the system PATH .
This arrangement means that both internal and external commands are always available no matter what your current directory happens to be.
In the main A-Z list of CMD commands the internal commands are indicated with a •
When you are working from any other shell, such as PowerShell then none of the internal commands are available unless you first open a CMD shell.
for example from PowerShell:
PS C: > cmd /c date /t
will launch a CMD shell, run the DATE /T command and then exit back to PowerShell. Of course in many cases this is not neccessary, (PowerShell has its own Date command) but can be useful if you need to run something 'the old way'.
It is possible for a system to have an internal command and an external command with the same name. If you have a command called DATE.exe and want to run that in preference to the internal DATE command, use the full pathname to the file e.g. C:\utils\date.exe even if your current directory is C:\utils\
“Tongues, like governments, have a natural tendency to degeneration; we have long preserved our constitution, let us make some struggles for our language” - Samuel Johnson: Preface to the Dictionary
Which.cmd - Show full path to executable.
Escape Characters, Delimiters and Quotes
© Copyright SS64.com 1999-2013
Some rights reserved