Displays the name of the current directory, or changes the current folder. Use with only one drive letter (for example, chdir) C: ), then chdir Displays the current drive name and folder. Used without parameters, chdir Displays the current drive and directory.
chdir [[/d] [Drive:][Path] [..]] [[/d] [Drive:][Path] [..]]
cd [[/d] [Drive:][Path] [..]] [[/d] [Drive:][Path] [..]]
Change the current drive or the current directory of the drive.
Specify the drive (if not the current drive) and directory to change to.
Indicates that you want to change to the parent folder.
Displays help at the command prompt.
Using command extensions
If command extension is enabled (that is, by default), the current directory path uses the same uppercase or lowercase folder name format to match the folder names exactly as they appear on the hard disk. For example, if the folder name on the hard disk is C: \ temp, then CD C:\TEMP Sets the current directory to C: \ temp, which matches the folder name format of the folder on the hard disk.
To disable command extensions for a special procedure, type:
When command extension is disabled, chdir Spaces are not treated as delimiters. In this way, you don’t have to [ Path] In quotation marks, you can change to the subdirectory name with spaces. For example, the following path can be changed to \ Start menu Subdirectories:
cd \winnt\profiles\username\programs\start menu
For more information on enabling and disabling command extensions, see in cmd。
Change to root
The root directory is the top level of the drive’s directory tree. To return to the root directory, type:
Change the default directory on a drive from another drive
To change the default directory on a drive from your drive, type one of the following commands:
To verify the changes made to the directory, type one of the following commands:
In the recovery console, a with different parameters is provided chdir Command.
If you use with a drive letter, then chdir The current directory for the drive is displayed. For example, when C:\Temp Type at the directory prompt cd c: , the following information is displayed:
To change the current directory to a directory named Reports You can type one of the following commands:
To change the current directory to \ Specials\Sponsors Subdirectory, you can type:
Or, if your current directory is \ Specials, you can type the following command to change to \ Specials\Sponsors Subdirectories:
To change from a subdirectory to its parent directory, type:
To display the name of the current directory, you can use the name without parameters chdir or cd Command. For example, if the current directory is B On drive \ Public \ Jones, type chdir The following will be displayed:
To be in D Work on the drive and want to C Plate \ Public\Jones and \ Public\Lewis Copy all files in the directory to D Under the root directory of the disk, please enter:
copy c:*.* d:\
copy c:*.* d:\
If you want to \ Public\Jones and \ Public\Lewis Copy all files in the directory to the drive D To the current location on, type:
copy c:*.* d:
copy c:*.* d: