|Purpose:||Display or change the current directory|
|Format:||CD [/D /N /R /X] [path | - | :path]|
|path||The directory to change to, optionally including a drive letter|
|folder||A Windows Shell folder name|
Internet: Can be used with FTP Servers.
CD and CHDIR are synonyms. You can use either one.
CD lets you navigate through a drive's subdirectory structure by changing the current working directory. If you enter CD and a directory name, the named directory becomes the new current directory. For example, to change to the subdirectory C:\FINANCE\MYFILES:
[c:\] cd \finance\myfiles
Every disk drive on the system has its own current directory. Specifying both a drive and a directory in the CD command will change the current directory on the specified drive, but will not change the default drive (unless you use the /D option). For example, to change the default directory on drive A:
[c:\] cd a:\utility
If path contains white space or special characters (which is valid only for an LFN drive), you must enclose it in double quotes.
If path begins with a ~ (tilde), CD will substitute to the user's home directory, as defined by HOME in the environment. (If HOME doesn't exist, TCC will look for %HOMEDRIVE + HOMEPATH.)
You can change to the parent directory with CD ..; you can also go up one additional directory level with each additional .. For example, CD .... will go up three levels in the directory tree (see Extended Parent Directory Names). You can move to a sibling directory (one that branches from the same parent directory as the current subdirectory) with a command like CD ..\newdir .
If you enter CD with no parameter or with only a disk drive name, it will display the current directory on the default or named drive.
If CD cannot change to the directory you have specified it will attempt to search the CDPATH in order to find a matching directory and switch to it. You can disable this default extended search with /N. You can also use wildcards in path to force an extended directory search.
If the EverythingSearch option is set, CD will use Everything Search (http://www.voidtools.com) instead of JPSTREE.IDX for fuzzy directory searches. Everything Search is faster, but will only work on local NTFS drives. Setting EverythingSearch is the equivalent of setting FuzzyCD=3 (*name*). The Take Command installer will install Everything Search automatically.
CD saves the current directory before changing to a new directory. You can switch back to the previous directory by entering CD -. (There must be a space between the CD command and the hyphen.) You can switch back and forth between two directories by repeatedly entering CD -. The saved directory is the same for both the CD and CDD commands. Drive changes and automatic directory changes also modify the saved directory, so you can use CD - to return to a directory that you exited with an automatic directory change. TCC recognizes a single hyphen on the command line as an internal alias for CDD -.
CD never changes the default drive, unless the /D option is specified. If you change directories on one drive, switch to another drive, and then enter CD -, the directory will be restored on the first drive but the current drive will not be changed.
At startup, TCC saves the last directory from SHRALIAS or (if loaded by TCSTART) the directory history list to the "CD -" buffer.
You can also CD to one of the predefined Windows folders. The syntax is:
where foldername can be:
|/D||Changes the current drive as well as directory. This option is included only for compatibility with the same option available in some versions of CMD. In most cases you should use CDD, which performs the same function.|
|/N||Skips the standard extended directory search when the directory is not found. This option is useful in batch files to force an error (rather than an extended search) if a directory is not found.|