The cd Command Changes Your Current Folder

To change directories in Windows Command Prompt, type cd followed by a space and the folder path you want to move into. For example, cd Documents moves you into the Documents folder. The folder must exist in your current location, or you must type the full path from the root of your drive.

Command Prompt always shows your current location in the prompt line itself. Before you type a command, look at the text on the left side of the blinking cursor — it tells you where you are. When you change directories successfully, that location updates when ready.

If you type a folder name that does not exist or is misspelled, Command Prompt returns the message "The system cannot find the path specified." Check the spelling and try again, or use the dir command first to see what folders are actually in your current location.

Key Takeaways

  • Type cd followed by a space and the folder name to move into that folder: cd Documents.
  • Type cd .. (with two periods) to move up one level to the parent folder.
  • Type the full path starting with the drive letter to jump directly to any folder: cd C:\Users\YourName\Documents.
  • Use dir to list all folders in your current location before you try to change into one.
  • Type cd / to move to the root of your current drive, or cd D: to switch to a different drive entirely.

Moving Into a Subfolder One Level Down

If you are in C:\Users\YourName and you want to enter the Documents folder inside it, type cd Documents and press Enter. Command Prompt does not require quotes around folder names unless the name contains spaces.

If your folder name has spaces — for example, "My Documents" — wrap it in quotes: cd "My Documents". Without the quotes, Command Prompt reads the space as the end of the command and tries to change into a folder called just "My", which fails.

After you press Enter, the prompt updates to show your new location. If you were at C:\Users\YourName and typed cd Documents, the prompt now reads C:\Users\YourName\Documents.

Moving Up to the Parent Folder

Type cd .. (the letters c and d, a space, and two periods with no space between them) to move up one level to the folder that contains your current folder. If you are in C:\Users\YourName\Documents, typing cd .. takes you to C:\Users\YourName.

You can chain multiple .. commands together to move up several levels at once. Type cd ..\.. to move up two levels, or cd ..\..\.. to move up three levels. Each pair of periods represents one level up.

This is useful when you are deep in a folder structure and want to get back to a parent folder without typing out the entire path.

Jumping Directly to Any Folder Using the Full Path

Instead of navigating one folder at a time, you can type the complete path from the root of your drive. Type cd C:\Users\YourName\Documents\Projects\Work and press Enter to jump directly to the Work folder, no matter where you are currently located.

Always start with the drive letter followed by a colon — C:, D:, E: — depending on which drive holds the folder. If any folder name in the path contains spaces, wrap the entire path in quotes: cd "C:\Users\YourName\My Documents".

This method is faster when you know exactly where you need to go and do not want to step through intermediate folders.

Switching Between Different Drives

If your computer has multiple drives — such as C: for your main hard drive and D: for an external drive or second partition — you can switch between them. Type just the drive letter followed by a colon: D: and press Enter. Command Prompt moves to the root of that drive.

After you switch drives, you can use cd commands to navigate folders on that drive just as you would on C:. Type cd Backups to enter a Backups folder on the D: drive, for example.

If you want to see what drive you are currently on, look at the prompt. It always shows the drive letter at the start — C:\ or D:\ — followed by the folder path.

Listing Folders Before You Change Into One

If you are not sure what folders exist in your current location, type dir and press Enter. Command Prompt displays a list of all files and folders in the current directory. Folders are marked with <DIR> on the right side of the listing.

Once you see the folder names, you can type cd followed by the exact name. This prevents typos and the "path not found" error. The dir command is especially useful when you are exploring a folder structure you do not know well.

You can also type dir /s to list all folders and subfolders recursively, though this produces a long output. For most purposes, plain dir is enough.

Handling Errors and Troubleshooting

The most common error is "The system cannot find the path specified." This means the folder name is misspelled, does not exist in your current location, or you forgot to include the full path. Double-check the spelling against the output of dir, or type the complete path from the drive root.

If you see "The filename, directory name, or volume label syntax is incorrect," you likely have a typo in the path itself — perhaps a missing backslash or an extra space. Read the path character by character and correct it.

If you are trying to access a folder on a network drive or external device and get an error, make sure the drive is connected and visible in File Explorer first. Then use the full path including the network location or drive letter.

Frequently Asked Questions

What is the difference between cd and cd .?

cd .. moves you up one level to the parent folder. A single period cd . does nothing — it keeps you in the current folder. Always use two periods to go up.

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

Yes. Windows Command Prompt accepts both cd C:\Users\YourName\Documents and cd C:/Users/YourName/Documents. Backslashes are more common in Windows, but forward slashes work too.

How do I go back to the folder I was just in?

Command Prompt does not have a built-in "back" button like File Explorer. You must type the path manually or use cd .. to go up one level. If you remember the path, type it out; otherwise, use dir to see where you are and navigate from there.

What if a folder name starts with a number or special character?

Folder names that start with numbers or contain special characters usually work fine without quotes — for example, cd 2024Reports. Use quotes only if the name contains spaces or certain symbols like asterisks or question marks.

Can I use cd to navigate to a folder on a USB drive?

Yes, if the USB drive is assigned a drive letter. Plug in the drive, then type E: (or whatever letter Windows assigned) to switch to it. Then use cd normally to navigate folders on the drive.