CDD |
|
| Purpose: | Change the current disk drive and directory. |
| Format: | CDD [/A /D[drive …] /N[J] /S[n][drive …] /U[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. |
|
See also: CD, MD, PUSHD, RD, and Directory Navigation.
Usage:
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
[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).
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.
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 -.
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.
Options:
| /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:
cdd /s
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, E, and the network volume \\server\dir1 in the database, use this command:
cdd /s cde \\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 Folders and List View windows 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:\
Note: The TREEEXCLUDE variable can be used to specify which drives and directories should be ignored when updating the directory database.