About

Cd is a command that:

More: the online help can be read by typing:

cd /?

Syntax

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]

where:

  • .. is the parent directory.
  • the D switch change the current drive in addition to changing the current directory for a drive.

How to

display the current directory

Type CD without parameters to display the current drive and directory.

cd

get the current directory

SET WORKING_DIR=%cd%

Command Extensions

If Command Extensions are enabled CHDIR changes as follows:

Path case

The current directory string is converted to use the same case as the on disk names. So CD C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk.

Spaces are not delimiters

CHDIR command does not treat spaces as delimiters, so it is possible to CD into a subdirectory name that contains a space without surrounding the name with quotes. For example:

cd \winnt\profiles\username\programs\start menu

is the same as:

cd "\winnt\profiles\username\programs\start menu"

which is what you would have to type if extensions were disabled.