cd or chdir
Display the name of or change the current working directory (folder).
cd [/d] [
directory] chdir [/d] [
With no arguments,
cd displays the full pathname
of the current directory. Given the pathname of an existing
directory, it changes the current directory to the specified
directory is on a different drive (for
example, if the current directory is
and you type
cd d:\nightmare), the current working
directory on that drive is changed, but the current working drive is
not. To change the current drive, use the
parameter, or simply type the letter followed by a colon, by itself,
at the prompt (see the examples below).
Pathnames can be absolute (including the full path starting with the root) or relative to the current directory. A path can be optionally prefixed with a drive letter. The special paths .. and ... (and so on) refer to the parent and grandparent of the current directory, respectively.
If the current drive is
c:\temp\wild the current directory:
Note how the current working directory is displayed in the prompt. If
the current directory is
c:\temp, all that is
Change to the parent directory:
Change to the grandparent (parent of the parent) directory:
Change to the root directory of the current drive:
Change to another ...