The cd command moves you to a different folder
To change the directory in Command Prompt, type cd followed by a space and the folder path you want to open, then press Enter. For example, cd Documents moves you into your Documents folder. The folder you name must exist in your current location, or you will see an error message saying the system cannot find the path specified.
Command Prompt always starts in your user folder (usually C:\Users\YourName). From there, you can move into any subfolder by typing its name. If you want to go deeper — into a folder inside a folder — separate each level with a backslash: cd Documents\Projects\Work takes you three levels down in one command.
The most common mistake is typing the folder name wrong or forgetting that Command Prompt is case-sensitive on some systems. If you see "The system cannot find the path specified," double-check the spelling and make sure the folder actually exists in the location you are currently in.
Key Takeaways
- Type cd followed by the folder name and press Enter to move into that folder.
- Use backslashes to navigate multiple levels at once, like cd Documents\Projects\Work.
- Type cd .. to move up one level to the parent folder.
- Type 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 navigate into one.
Moving up one level or to the root
Sometimes you need to go backward instead of forward. Type cd .. (that is cd, space, two periods) to move up one level to the parent folder. If you are in C:\Users\YourName\Documents, typing cd .. takes you to C:\Users\YourName. Type it again and you move to C:\Users. This works no matter how deep you are in the folder structure.
If you want to jump all the way to the root of your drive, type cd \ (cd, space, backslash). This takes you to C:\ or whichever drive you are currently on. From there you can navigate into any top-level folder on that drive.
Switching to a different drive
If you need to work on a different drive — like D:\ or E:\ — typing cd alone will not work. Instead, type the drive letter followed by a colon: D: and press Enter. Command Prompt switches to that drive and shows you the folder you were last in on that drive.
Once you are on the new drive, use cd normally to navigate into folders. You can also combine both steps: type D:\Folder\Name and press Enter to switch drives and move into a specific folder in one command.
Seeing what folders are available
Before you try to change into a folder, you need to know what folders exist in your current location. Type dir and press Enter. Command Prompt lists every file and folder in the current directory. Folders are marked with <DIR> at the end of the line, and files show their size in bytes.
The output can be long if you have many files. To see only folders, type dir /ad and press Enter. The /ad flag tells Command Prompt to show only directories (folders), which makes it easier to spot the one you want to navigate into.
Using the full path instead of navigating step by step
You do not have to navigate one folder at a time. If you know the complete path to where you want to go, type it all at once. For example, cd C:\Users\YourName\Documents\Projects\Work takes you directly there in one command, no matter where you started.
This is especially useful when you are jumping between distant folders. Instead of typing cd .. multiple times to climb back up, then cd multiple times to go down a different branch, just type the full path and press Enter. Command Prompt moves you there immediately.
Handling folder names with spaces
If a folder name contains spaces — like "My Documents" or "Program Files" — you must put the entire path in quotation marks. Type cd "My Documents" or cd "C:\Program Files\MyApp". Without the quotes, Command Prompt treats the space as the end of the command and tries to navigate to a folder called just "My", which does not exist.
This is one of the most common errors when navigating in Command Prompt. If you see an error and the folder name has a space in it, go back and add quotation marks around the entire path.
Frequently Asked Questions
What does "The system cannot find the path specified" mean?
The folder you typed does not exist in your current location, or you misspelled the name. Type dir to see what folders are actually there, check the spelling, and try again. Make sure you are in the right starting location first.
How do I get back to my user folder?
Type cd %userprofile% and press Enter. This takes you directly to C:\Users\YourName no matter where you are. The %userprofile% variable is a shortcut that Command Prompt understands.
Can I navigate to a folder on a USB drive or external hard drive?
Yes. First type the drive letter (like E:) to switch to that drive, then use cd normally to navigate into folders on it. If you do not know the drive letter, open File Explorer, look at the left sidebar, and find the letter next to your device name.
What if I want to go to a folder but I do not know the full path?
Use dir to see what is in your current location, navigate into the folder you can see, then use dir again to see what is inside that folder. Keep going until you find what you need. This is slower than typing the full path, but it works when you are exploring.