The cd command moves you between folders in Command Prompt

To change directory in Command Prompt, type cd followed by a space and the folder path, then press Enter. The command stands for "change directory" and is how you navigate between folders from the command line. After you press Enter, your prompt will show the new folder location.

Command Prompt starts you in your user folder by default — usually something like C:\Users\YourName. From there, you can move into any subfolder or jump to a completely different location on your computer. Understanding the basic syntax and a few common patterns will let you navigate anywhere you need to go.

Key Takeaways

  • Type cd FolderName to enter a subfolder inside your current location.
  • Type cd .. (two periods) to go up one level to the parent folder.
  • Type cd C:\path\to\folder to jump directly to any folder using its full path.
  • Type cd /d D: to switch to a different drive letter, like an external drive or second hard drive.
  • If a folder name contains spaces, wrap the entire path in quotation marks: cd "Program Files".

Moving into a subfolder one level down

The simplest navigation is moving into a folder that exists inside your current location. Type cd, add a space, then type the exact folder name and press Enter.

For example, if you are in C:\Users\YourName and you want to enter the Documents folder, type cd Documents and press Enter. Your prompt will now show C:\Users\YourName\Documents. The folder name must match exactly — if the folder is called "My Documents" but you type just "Documents", Command Prompt will tell you the folder does not exist.

Going back up to the parent folder

To move up one level to the folder that contains your current location, type cd .. (that is the letters c and d, a space, and two periods with no space between them) and press Enter. Each time you run this command, you go up one level.

If you are in C:\Users\YourName\Documents\Work and you type cd .., you will move to C:\Users\YourName\Documents. Type it again and you will move to C:\Users\YourName. You can keep typing cd .. repeatedly to climb all the way to the root of your drive, but you cannot go higher than that.

Jumping directly to any folder with a full path

Instead of navigating step by step, you can jump straight to any folder by typing its complete path. Type cd, a space, then the full path starting from the drive letter, and press Enter.

For example, type cd C:\Program Files\Google\Chrome to jump directly to the Chrome installation folder, no matter where you currently are. This is much faster when you know exactly where you need to go. The path must be typed exactly as it exists on your computer — capitalization does not matter, but folder names and backslashes must be correct.

Switching to a different drive

If your computer has multiple drives — such as a second hard drive, an external USB drive, or a network location assigned a drive letter — you can switch to it using the cd /d command. Type cd /d D: to move to the D drive, or replace D with whatever letter your drive uses.

The /d flag tells Command Prompt to change both the directory and the drive at the same time. Without it, typing just cd D: will not work. After you press Enter, your prompt will show the new drive letter. You can then use regular cd commands to navigate folders on that drive.

Handling folder names with spaces

Folder names that contain spaces require special handling. Wrap the entire path in double quotation marks so Command Prompt treats it as a single name rather than multiple separate words.

For example, if you have a folder called "My Documents", type cd "My Documents" instead of cd My Documents. Without the quotation marks, Command Prompt will try to change to a folder called "My" and fail. The same rule applies to full paths: type cd "C:\Program Files\My Application" to navigate to a folder with spaces anywhere in the path.

Viewing what is in your current folder

After you change directory, you may want to see what folders and files are inside your new location. Type dir and press Enter to list everything in the current folder. This helps you confirm you are in the right place and see the exact names of subfolders you might want to enter next.

The dir command shows the folder name, the date it was created or modified, and whether each item is a folder or a file. If the list is very long, you can type dir /p to display it one screen at a time, pausing after each screen so you can read it.

Frequently Asked Questions

What do I do if I get "The system cannot find the path specified"?

This error means the folder path you typed does not exist or is spelled incorrectly. Check that the folder name matches exactly, including capitalization and any spaces. If the folder name has spaces, make sure you wrapped it in quotation marks. Use dir to list the contents of your current folder and verify the exact spelling of the subfolder you want to enter.

Can I use forward slashes instead of backslashes in the path?

Command Prompt accepts both forward slashes and backslashes in paths, so cd C:/Users/YourName/Documents and cd C:\Users\YourName\Documents both work. Most people use backslashes because that is what Windows displays, but either one will work.

How do I get back to the C drive root if I am on a different drive?

Type cd /d C:\ to switch to the C drive and move to its root folder in one command. The /d flag is necessary when switching drives. After you press Enter, your prompt will show C:\.

What if a folder name has special characters like parentheses or ampersands?

Wrap the path in quotation marks just as you would for spaces. For example, type cd "Program Files (x86)" to enter a folder with parentheses in its name. The quotation marks tell Command Prompt to treat everything inside as a single folder name.

Can I use tab to autocomplete folder names?

Yes. Type cd, a space, and the first few letters of the folder name, then press Tab. Command Prompt will autocomplete the name for you. Press Tab again to cycle through other folders that start with those letters. This is faster than typing the full name and helps avoid spelling mistakes.