The CD command displays the current directory or changes it to the given pathname.
If no pathname is supplied, it writes the name of the current directory on the current drive to its standard output. If a pathname is supplied that comprises only a drive letter followed by a colon, and no path, it writes the name of the current directory for that drive to its standard output.
If a pathname is supplied that doesn't just comprise a drive letter and colon, it changes the current directory, and if the /D option is used the current drive as well. If the pathname supplied includes an explicit drive specification, the current directory for that drive is changed, and if the /D option is used the current drive is changed to that drive. Otherwise, the current directory on the current drive is changed.
The current directories in a child process started by the command interpreter are inherited from the command interpreter process with the value that they had at that particular time. Any use of the CD command in the command interpreter after a child process has been started will not affect that process.
CDD PUSHD POPD DIRSTACK