|Purpose:||Change the current disk drive and directory|
|Format:||CDD [/A /D[drive ...] /N[J] /S[n][drive ...] /U[n][drive ...] /X] [path | - ]|
|path||The name of the directory (or drive and directory) to change to.|
|drive||A drive or list of drives to include in the extended directory search database.|
CDD is similar to the CD command, except that it also changes the default disk drive if one is specified. For example, to change from the root directory on drive A to the subdirectory C:\WP:
[a:\] cdd c:\wp
If no drive / path argument is supplied, CDD displays the current drive and directory.
CDD can also be used to create and update the Extended Directory Search database (JPSTREE.IDX).
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 CDD ..; you can also go up one additional directory level with each additional [.]. For example, CDD .... will go up three levels in the directory tree.
CDD can also change to a network drive and directory specified with a UNC name (see File Systems for details).
When you use CDD to change to a directory on an LFN drive, you must quote the path name if it contains white space or special characters.
If CDD cannot change to the directory you have specified it will first search the CDPATH, then the extended directory search database 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 the path to force an extended directory search. Read the section on Directory Navigation for complete details on these and other directory navigation features.
If the TCMD.INI directive EverythingSearch is set, CDD will use Everything Search (free at http://www.voidtools.com) instead of JPSTREE.IDX for fuzzy directory searches. Everything Search is slightly 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.
CDD saves the current drive and directory before changing to a new directory. You can switch back to the previous drive and directory by entering CDD -. (There must be a space between the CDD command and the hyphen.) You can switch back and forth between two drives and directories by repeatedly entering CDD -. 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 CDD - to return to a directory that you exited with a drive change or an automatic directory change. TCC recognizes a single hyphen on the command line as an internal alias for CDD -.
At startup, TCC saves the last directory from SHRALIAS or (if loaded by TCSTART) the directory history list to the "CD -" buffer.
Directory changes made with CDD are recorded in the directory history list and can be displayed in the directory history window, which allows you to return quickly to a recently-used directory.
Windows limits the permissible length of the full subdirectory name (see the Directories and Subdirectories topic for information on directory names).
When changing directories, TCC maintains the original case of each path element. This is necessary for a few programs which are case-sensitive in their use of directory names.
You can also CD to one of the predefined Windows shell folders. The syntax is:
where foldername can be:
AccountPictures (Windows 8+)
ApplicationShortcuts (Windows 8+)
CameraRoll (Windows 8.1+)
PublicUserTiles (Windows 8+)
RoamedTileImages (Windows 8+)
RoamingTiles (Windows 8+)
Screenshots (Windows 8+)
SearchHistory (Windows 8.1+)
SkyDrive (Windows 8.1+)
SkyDriveCameraRoll (Windows 8.1+)
SkyDriveDocuments (Windows 8.1+)
SkyDrivePictures (Windows 8.1+)
|/A||When CDD is used with this option, it displays the current directory on all drives from C: to the last drive in the system. You cannot move to a new drive and directory and use /A in the same command.|
|/D||Removes the specified drives or directory trees from the Extended Directory Search database (JPSTREE.IDX). Uses the same syntax for drive and directory names as /S. For example, to delete the directories under F:\MYDIR from JPSTREE.IDX:|
cdd /d f:\mydir
|/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.|
|/S||Builds or rebuilds the Extended Directory Search database (JPSTREE.IDX). You cannot move to a new drive and directory and use /S in the same command.|
To include all local hard drives in the database, use the command:
To limit or add to the list of drives included in the database, list the drives and network volume names after the /S switch. For example, to include drives C, D, and E, and the sharename \\server\dir1, use this command:
cdd /s c:\ d:\ e:\ \\server\dir1
All non-hidden directories on the listed drives will be indexed. CDD /S will also index the hidden directories if the Complete Hidden Files option is set. Each time you use /S, everything in the previous directory database is replaced by the new database that is created. To update the database see /U below.
You can index specific subdirectories rather than an entire drive. For example, to index all directories on drive C but only the MSSDK directory tree on drive D:
cdd /s c:\ d:\mssdk
If you specify a number after the /S, CDD will limit the subdirectory recursion to that number. For example, if you have a directory tree "\a\b\c\d\e", /S2 will only index the "a", "b", and "c" directories.
|/TO||Change the current directory in the Take Command File Explorer window without changing the TCC current directory.|
|/U||Updates the Extended Directory Search database (JPSTREE.IDX) with the specified drives and directories instead of rebuilding the whole directory database. Uses the same syntax for drive and directory names as /S. For example, to update the D:\MSSDK tree and all of drive E:|
cdd /u d:\mssdk e:\
If you specify a number after the /U, CDD will limit the subdirectory recursion to that number. For example, if you have a directory tree "\a\b\c\d\e", /S2 will only update the "a", "b", and "c" directories.
Note: The TREEEXCLUDE variable can be used to specify which drives and directories should be ignored when updating the directory database.