cd or chdir |
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. The syntax is:
cd [ directory ]
If directory is on a different drive (for example, if the current directory is c:\dream and you type cd d:\nightmare ), the current working directory on that drive is changed, but the current working drive is not; that is, you'll still be in c:\dream . To change the current drive, simply type the letter followed by a colon , by itself, at the prompt. When you subsequently switch to the D: drive by typing d: at the prompt, you'll be dumped right into the nightmare directory.
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 .. refer to the current directory and its parent directory, respectively.
If the current drive is C: , to make c:\chefs\Akira the current directory:
cd \chefs\Akira
To change to the parent directory (here, c:\chefs ):
cd ..
To change to the root directory of the current drive (here, c:\ ):
cd \