The cd command moves you between folders
To change directories in Command Prompt, type cd followed by a space and the name of the folder you want to enter, then press Enter. That is the entire action — Command Prompt will move you into that folder, and your prompt will show you are now inside it.
The reason you need to do this: Command Prompt starts you in one location (usually your user folder), but the files and programs you want to work with are often in other folders. Changing directories is how you navigate to them so you can run commands on those files.
The prompt itself tells you where you are. If you see C:\Users\YourName>, you are in your user folder. After you change directories, the prompt updates to show your new location — for example, C:\Users\YourName\Documents> if you moved into Documents.
Key Takeaways
- Type cd followed by a space and the folder name to move into that folder one level deeper.
- Type cd .. (cd space dot dot) to move up one level to the parent folder.
- Type cd \ to jump directly to the root of your drive, or cd C:\ to jump to a specific drive.
- The prompt always shows your current location, so you can see whether the command worked.
- Folder names with spaces need quotes around them, like cd "Program Files".
Moving into a folder one level down
If you want to enter a folder that is inside your current location, type cd followed by the folder name. For example, if you are in C:\Users\YourName> and you want to go into the Documents folder, type cd Documents and press Enter.
Command Prompt is case-insensitive, so cd documents, cd Documents, and cd DOCUMENTS all work the same way. The folder name must be spelled exactly as it appears, but capitalization does not matter.
If the folder does not exist in your current location, Command Prompt will show an error: The system cannot find the path specified. This means either the folder name is misspelled, or the folder is not inside the directory you are currently in. Check the spelling and try again, or use the dir command to see what folders are actually in your current location.
Moving up to the parent folder
To go back up one level — from a subfolder to the folder that contains it — type cd .. (that is cd, a space, and two periods) and press Enter. This moves you to the parent directory.
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 move to C:\Users\YourName>. You can type it as many times as you need to climb back up the folder structure.
Jumping directly to a specific location
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 of the folder you want to reach. For example, cd C:\Users\YourName\Documents\Work\Projects takes you directly to the Projects folder, no matter where you started.
This is faster when you know exactly where you need to go. You do not have to navigate through each intermediate folder — Command Prompt takes you straight there in one command.
If the path includes a folder name with spaces in it, put the entire path in quotes: cd "C:\Program Files\My process". Without the quotes, Command Prompt will stop reading at the first space and show an error.
Switching to a different drive
If your computer has multiple drives (like C: and D:), you can move between them. Type the drive letter followed by a colon, like D: and press Enter. Command Prompt will switch to that drive and show you the root directory of it.
You can also combine this with a path: type cd D:\Backups to jump directly to the Backups folder on the D: drive. This works the same way as moving within a single drive.
Handling folder names with spaces and special characters
Folder names that contain spaces cause Command Prompt to misread your command. If you type cd Program Files, Command Prompt thinks you want to go to a folder called "Program" and will show an error.
To fix this, wrap the folder name in double quotes: cd "Program Files". The quotes tell Command Prompt to treat the entire text as a single folder name, spaces and all. This works for any folder name with spaces, whether you are moving one level or using a full path: cd "C:\Program Files\My App".
Folder names with other special characters like hyphens, underscores, and parentheses do not need quotes — only spaces do.
Seeing what folders are available before you move
If you are not sure what folders exist in your current location, type dir and press Enter. This shows you a list of all files and folders in the directory you are currently in. Folders are marked with <DIR> next to their names.
Once you see the folder you want, you can type cd followed by its exact name. Using dir first prevents spelling mistakes and saves you from getting an error message.
Frequently Asked Questions
What does the error "The system cannot find the path specified" mean?
This error appears when the folder you typed does not exist in your current location, or the path is misspelled. Type dir to see what folders are actually available, check the spelling of the folder name, and try again. If you are using a full path, make sure every folder in that path exists.
Can I use cd to move to a folder on a network drive?
Yes, if the network drive is already mapped to a drive letter on your computer. Type cd Z: (or whatever letter your network drive uses) followed by the folder path, just as you would for a local drive. If the network drive is not mapped, you will need to map it first through File Explorer or use the net use command.
What is the difference between cd and cd .?
cd . (cd space dot) does nothing — it keeps you in your current directory. cd .. (cd space dot dot) moves you up one level. The single dot represents the current folder, and the double dot represents the parent folder.
How do I get back to the root of my drive quickly?
Type cd \ to jump to the root of your current drive (usually C:\). If you want to go to the root of a different drive, type the drive letter and colon, like D:, and you will be at the root of that drive.