The cd command moves you between folders
To change directory in Command Prompt, type cd followed by the folder path you want to enter, then press Enter. Command Prompt will move into that folder, and your prompt will show the new location. This is how you navigate your computer's file system from the command line instead of using File Explorer.
The most common mistake is typing the folder name without the full path. If you type cd Documents when you are not already in the parent folder that contains Documents, Command Prompt will tell you "The system cannot find the path specified." You need either the full path from the root drive, or you need to be in the correct parent folder first.
Key Takeaways
- Type cd followed by a space and the folder path, then press Enter to move into that folder.
- Use cd .. to move up one level to the parent folder, or cd \ to jump to the root of your current drive.
- Type dir to see what folders exist in your current location before you try to change into one.
- If a folder name has spaces, wrap the entire path in quotation marks: cd "Program Files"
- Use cd /d C: to switch to a different drive entirely, such as moving from C: to D:
Using the full path from your C: drive
The safest way to change directory is to type the complete path starting from the drive letter. Open Command Prompt, type cd C:\Users\YourUsername\Documents (replacing YourUsername with your actual Windows username), and press Enter. Command Prompt will move directly into your Documents folder.
You can find the full path to any folder by opening File Explorer, clicking on the folder you want, and looking at the address bar at the top. Copy that path and paste it into Command Prompt after typing cd. This method works from anywhere in your file system because you are giving Command Prompt the complete directions.
Moving up to the parent folder with cd ..
If you are inside a folder and want to go back to the folder that contains it, type cd .. (that is cd, a space, and two periods) and press Enter. Each time you run this command, you move up one level. If you are in C:\Users\YourUsername\Documents\Work, typing cd .. takes you to C:\Users\YourUsername\Documents.
You can chain these together to move up multiple levels at once. Type cd ..\.. to go up two levels, or cd ..\..\.. to go up three levels. This is faster than typing the full path when you only need to move back a few folders.
Jumping to the root of your drive with cd \
Type cd \ (cd, a space, and a backslash) to jump directly to the root of your current drive. If you are on the C: drive, this takes you to C:\. From there, you can see the main folders like Users, Program Files, and Windows.
This is useful when you have navigated deep into a folder structure and want to start over without typing a long path. It is faster than typing cd .. multiple times.
Handling folder names with spaces
If a folder name contains spaces, you must wrap the entire path in quotation marks or Command Prompt will misread it. For example, to enter a folder called "My Documents", type cd "C:\Users\YourUsername\My Documents" and press Enter. Without the quotation marks, Command Prompt will stop at the first space and try to find a folder called just "My", which does not exist.
This applies to any part of the path that has spaces. If you are moving between folders and one has a space in its name, quote that section: cd "Program Files" or cd "My Folder\Subfolder". It is easier to quote the whole path than to remember which parts need quotes.
Switching to a different drive
If you want to move to a folder on a different drive — such as from C: to D: or E: — type cd /d D:\FolderName and press Enter. The /d flag tells Command Prompt to change both the directory and the drive. Without it, typing just cd D:\FolderName will not work; you will get an error.
If you only want to switch drives without changing folders, type the drive letter followed by a colon: D: and press Enter. You will move to whatever folder you were last in on the D: drive. Then you can use cd normally to navigate within that drive.
Checking what folders exist before you change into one
Before you type a cd command, you can see what folders are in your current location by typing dir and pressing Enter. This shows you a list of all files and folders in the current directory. Look for the entries marked <DIR> — those are folders you can enter.
This prevents the "The system cannot find the path specified" error. If you do not see the folder name in the dir output, you are looking in the wrong place, and you need to navigate to a different location first or use the full path from the root of your drive.
Frequently Asked Questions
What does "The system cannot find the path specified" mean?
Command Prompt could not find the folder you typed. Either the folder does not exist, you misspelled the name, or you are not in the parent folder that contains it. Type dir to see what folders are actually in your current location, then try again with the correct name or the full path from C:\
How do I see what folder I am currently in?
Look at the prompt itself. It shows your current path. For example, if the prompt reads C:\Users\YourUsername\Documents>, you are in the Documents folder. The path updates every time you change directory.
Can I use forward slashes instead of backslashes?
Modern versions of Windows Command Prompt accept both forward slashes and backslashes in paths. However, backslashes are the Windows standard, and some older systems may not recognize forward slashes. Use backslashes to be safe: cd C:\Users\YourUsername\Documents
What if I type a folder name wrong — will it damage anything?
No. If you misspell a folder name, Command Prompt simply tells you the path does not exist and does nothing else. You can type the command again with the correct spelling. There is no risk of deleting or changing files just by typing a wrong path.
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 have to navigate manually using cd commands. If you remember the path, type it. If you do not, use cd .. to move up one level at a time until you find where you want to be.