The basic command to move between folders
To change directories in Command Prompt, type cd followed by a space and the path to the folder you want to enter, then press Enter. For example, cd Documents moves you into your Documents folder. The folder name must exist in your current location, or you need to provide the full path from your computer's root drive.
Command Prompt shows your current location at the start of each line. On Windows, this typically looks like C:\Users\YourName> or C:\Users\YourName\Documents>. The text before the greater-than sign tells you exactly where you are in your folder structure.
Key Takeaways
- Type cd followed by the folder name or path to move into that directory.
- Use cd .. to move up one level to the parent folder.
- Use cd / to jump to the root of your current drive (usually C:\).
- Type dir to see what folders exist in your current location before you try to enter one.
- Folder names with spaces need to be wrapped in quotation marks, like cd "Program Files".
Moving to a folder in your current location
When you open Command Prompt, you start in your user folder, usually C:\Users\YourName. From there, you can move into any subfolder by typing cd and the folder name. If you want to enter Documents, type cd Documents and press Enter. If you want to enter Downloads, type cd Downloads.
If the folder name contains spaces, you must wrap it in quotation marks. For example, to enter a folder called "My Projects", type cd "My Projects". Without the quotes, Command Prompt reads the space as the end of the command and looks for a folder called "My" instead.
If you try to enter a folder that does not exist in your current location, Command Prompt returns an error: "The system cannot find the path specified." This means either the folder name is spelled wrong, or it is not inside the folder you are currently in.
Moving up to the parent folder
To move up one level in your folder structure, type cd .. (cd followed by two periods) and press Enter. This takes you to the folder that contains your current folder. If you are in C:\Users\YourName\Documents and type cd .., you move to C:\Users\YourName.
You can chain multiple .. commands together to move up several levels at once. Typing cd ..\.. moves up two levels. Typing cd ..\..\.. moves up three levels. Each pair of periods represents one level up.
Jumping to a specific path
Instead of moving one folder at a time, you can jump directly to any location by typing the full path. Type cd followed by the complete address, such as cd C:\Users\YourName\Documents\Projects\Active. Command Prompt takes you straight to that folder if it exists.
You can also use this method to move to a different drive. If your computer has a D: drive and you want to go there, type cd D:\. If you want to go to a specific folder on that drive, type the full path, like cd D:\Backups\2024.
Viewing what folders are available
Before you try to change directories, you can see what folders exist in your current location by typing dir and pressing Enter. This shows a list of all files and folders in the current directory. Folders are marked with <DIR> next to their names, while files show their size in bytes.
The dir command helps you avoid typing a folder name that does not exist. Once you see the folder you want to enter, you can type cd followed by its exact name. Pay attention to capitalization and spacing — Command Prompt on Windows is not case-sensitive, but the folder name must match exactly.
Returning to your home folder or the drive root
To jump back to your user folder from anywhere, type cd %userprofile% and press Enter. This works from any location on your C: drive and takes you directly to C:\Users\YourName. The %userprofile% is a system variable that always points to your home folder.
To go to the root of your current drive (usually C:\), type cd \ and press Enter. This is useful when you have moved deep into nested folders and want to start over from the top level of your drive.
Common mistakes and how to fix them
The most common error is typing a folder name that does not exist or is misspelled. If you see "The system cannot find the path specified," check the spelling and use dir to confirm the folder exists in your current location. Another frequent mistake is forgetting quotation marks around folder names with spaces — Command Prompt will not find "My Projects" if you type it as cd My Projects without quotes.
If you try to change to a folder on a different drive and it does not work, you may need to change drives first. Type the drive letter followed by a colon, like D:, then press Enter. After that, you can use cd to navigate to folders on that drive. Some users also forget that cd only works with folders, not files — if you type a file name, Command Prompt returns an error.
Frequently Asked Questions
What is the difference between cd and cd .?
cd . (cd followed by one period) does nothing — it keeps you in your current folder. cd .. (cd followed by two periods) moves you up one level to the parent folder. The single period represents the current directory, while the double period represents the parent directory.
Can I use forward slashes instead of backslashes in paths?
Yes. Command Prompt accepts both cd C:\Users\YourName\Documents and cd C:/Users/YourName/Documents. Both work the same way. Most Windows users type backslashes because that is the Windows standard, but forward slashes work too.
How do I change to a folder on a USB drive or external hard drive?
First, find the drive letter assigned to your external drive (usually E:, F:, or higher). Type the drive letter followed by a colon, like E:, and press Enter. Then use cd to navigate to folders on that drive, just as you would on your C: drive.
What if a folder name has special characters like parentheses or ampersands?
Wrap the entire folder name in quotation marks. For example, to enter a folder called "Project (2024)", type cd "Project (2024)". Quotation marks protect special characters and spaces from being misinterpreted by Command Prompt.