How to Change Directory in CMD on Windows 10 and 11

To change directories in Command Prompt on Windows 10 or Windows 11, type cd followed by a space and the folder path, then press Enter, like cd Documents or cd C:\Users\YourName\Downloads. Use cd .. to go up one level and cd \ to go to the root of the drive. To switch to a different drive and folder at once, add /d: cd /d D:\Photos.

Common cd commands

Command What it does
cd Documents Opens a folder inside the current folder
cd C:\Users\Alex\Downloads Goes to a full path
cd "Project Files" Opens a folder with spaces in its name
cd .. Goes up one folder
cd ..\.. Goes up two folders
cd \ Goes to the root of the current drive
D: Switches to drive D
cd /d D:\Photos Switches drive and folder in one step
cd Shows the current folder
Command Prompt showing cd commands to open a folder, go up a level, and switch drives with cd /d
(1) Opening a folder with cd, and (2) switching drives and folders with cd /d. (Illustration)

How to change directories step by step

  1. Press Windows + R, type cmd, and press Enter. Command Prompt usually starts in your user folder, like C:\Users\YourName.
  2. Type dir and press Enter to list the folders here.
  3. Type cd, a space, and the folder name, then press Enter.
  4. Repeat to go deeper, or use cd .. to go back up.

Time-saving tips

  • Tab completion: Type the first few letters of a folder and press Tab. Command Prompt fills in the name (and adds quotes if needed). Press Tab again to cycle through matches.
  • Drag and drop: Type cd (with a space), then drag a folder from File Explorer into the window to paste its path.
  • Open Command Prompt in a folder: In File Explorer, click the address bar, type cmd, and press Enter. On Windows 11, right-click in the folder and choose Open in Terminal.
  • Jump and return: pushd C:\Some\Folder saves your place and moves you there. popd takes you back.

Why cd isn’t working

  • “The system cannot find the path specified”: Check the spelling, and use quotes around names with spaces.
  • Nothing happens when changing drives: cd D:\Folder doesn’t switch drives on its own. Use cd /d D:\Folder or type D: first.
  • Access denied: Some system folders need an administrator Command Prompt.

Changing directories in PowerShell and Windows Terminal

In PowerShell (the default in Windows 11’s Terminal), cd works too. It’s an alias for Set-Location. PowerShell also switches drives without /d: cd D:\Photos works directly. Use cd ~ to go to your user folder.

Frequently asked questions

Is cd the same as chdir?

Yes. chdir is the longer name for the same command.

Is cd case-sensitive in Windows?

No. cd documents and cd Documents go to the same folder.

How do I go to the Desktop in Command Prompt?

Type cd %USERPROFILE%\Desktop. If OneDrive backs up your Desktop, the path may be %USERPROFILE%\OneDrive\Desktop.

Do these commands work in Windows 11?

Yes. Every command here works the same in Windows 10 and Windows 11.