The cd command moves you to a different folder
To change directories in Command Prompt, type cd followed by the folder path you want to move to, then press Enter. The letters stand for "change directory". Command Prompt will then show you that you are now inside that folder — the folder name appears in the prompt line itself.
For example, if you type cd Documents and press Enter, you move into your Documents folder. If you type cd C:\Users\YourName\Downloads, you move to that exact location on your hard drive. The prompt changes to show where you are.
Key Takeaways
- Type cd followed by a space and the folder name or path, then press Enter to move into that folder.
- Use cd .. (with two dots) to move up one level to the parent folder.
- Type cd / to jump to the root of your current drive, or cd C:\ to jump to the root of the C drive.
- If a folder name has spaces in it, wrap the entire path in quotation marks: cd "Program Files".
- Type dir to see what folders exist in your current location before you try to change into one.
Moving into a folder one level down
If you want to move into a folder that is directly inside your current location, type cd followed by the folder name. For instance, if you are in C:\Users\YourName and you want to go into the Documents folder inside it, type cd Documents and press Enter.
Command Prompt does not care about uppercase or lowercase — cd documents and cd Documents do the same thing. After you press Enter, the prompt line updates to show your new location, usually ending with the folder name you just entered.
Moving up to the parent folder
To move up one level — from a folder back into the folder that contains it — type cd .. (that is the letters c and d, a space, and two periods with no space between them). Press Enter, and you move up one level.
You can chain these together to move up multiple levels at once. Type cd ..\.. to move up two levels, or cd ..\..\.. to move up three levels. Each pair of dots represents one level up.
Jumping to a specific path on your drive
If you know the full path to where you want to go, you can jump there directly without moving through each folder one at a time. Type cd followed by the complete path. For example, cd C:\Users\YourName\AppData\Local\Temp takes you straight to the Temp folder.
You can also jump to a different drive entirely. If you are on the C drive and want to go to the D drive, type cd D:\ and press Enter. Command Prompt switches to that drive and shows you the root folder of the D drive.
Handling folder names with spaces
If a folder name contains spaces, Command Prompt will misread it unless you wrap the path in quotation marks. For example, the folder "Program Files" has a space in the middle. If you type cd Program Files without quotes, Command Prompt tries to move into a folder called "Program" and fails.
Instead, type cd "Program Files" with the quotation marks included. The same rule applies to any path with spaces: cd "My Documents" or cd "C:\Users\My User\Desktop". The quotes tell Command Prompt to treat the entire text as one folder name.
Checking what folders exist before you move
If you are not sure what folders are inside your current location, type dir and press Enter. This lists all the files and folders in the directory you are currently in. Look for entries marked as <DIR> — those are folders you can move into.
Once you see the folder name you want, use the cd command to move into it. This prevents the common mistake of typing a folder name that does not exist and getting an error message saying "The system cannot find the path specified."
Common mistakes and how to fix them
The most frequent error is typing a folder name that does not exist in your current location. Command Prompt responds with "The system cannot find the path specified." Fix this by typing dir first to see what folders are actually there, then use the exact name shown.
Another common problem is forgetting quotation marks around folder names with spaces. If you see an error after typing a path with spaces, go back and add quotation marks around the entire path. Also remember that cd .. uses two periods, not one — typing cd . with a single period does not work.
Frequently Asked Questions
What is the difference between cd and cd .?
cd .. (two periods) moves you up one folder level to the parent directory. cd . (one period) refers to your current directory and does nothing. Always use two periods when you want to move up.
Can I change to a folder on a different drive?
Yes. Type cd D:\FolderName to move to a folder on the D drive, or type cd E:\ to jump to the root of the E drive. Command Prompt switches drives and moves to that location in one command.
Why does Command Prompt say the path does not exist when I know the folder is there?
The most common cause is a typo in the folder name or a missing quotation mark around a name with spaces. Type dir to see the exact spelling of folders in your current location, then copy that spelling into your cd command.
How do I get back to the main user folder after moving around?
Type cd %userprofile% and press Enter. This takes you directly to your user home folder (usually C:\Users\YourName) no matter where you are. Alternatively, type cd \ to jump to the root of your current drive.
Can I use forward slashes instead of backslashes in paths?
Modern versions of Command Prompt accept both forward slashes and backslashes in paths, so cd C:/Users/YourName/Documents and cd C:\Users\YourName\Documents both work. Backslashes are more traditional for Windows, but either one is fine.