Windows command cd command

Share on facebook
Share on google
Share on twitter
Share on linkedin

cd

8 Useful Commands to Manage Your Files in Command Prompt - Make Tech Easier

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/cd

https://computerthang.com/p/dell-latitude-7410-14-in-notebook-a300/

 Note

This command is the same as the chdir command.

Syntax

cd [/d] [<drive>:][<path>]
cd [..]
chdir [/d] [<drive>:][<path>]
chdir [..]

Parameters

PARAMETERS
Parameter Description
/d Changes the current drive as well as the current directory for a drive.
<drive>: Specifies the drive to display or change (if different from the current drive).
<path> Specifies the path to the directory that you want to display or change.
[..] Specifies that you want to change to the parent folder.
/? Displays help at the command prompt.

Remarks

If command extensions are enabled, the following conditions apply to the cd command:

  • The current directory string is converted to use the same case as the names on the disk. For example, cd c:\temp would set the current directory to C:\Temp if that is the case on the disk.
  • Spaces aren’t treated as delimiters, so <path> can contain spaces without enclosing quotation marks. For example:
    cd username\programs\start menu
    

    is the same as:

    cd "username\programs\start menu"
    

    If extensions are disabled, the quotation marks are required.

  • To disable command extensions, type:
    cmd /e:off
    

Examples

To return to the root directory, the top of the directory hierarchy for a drive:

cd\

To change the default directory on a drive that is different from the one you are on:

cd [<drive>:[<directory>]]

To verify the change to the directory, type:

cd [<drive>:]