The basic command to change folders in Command Prompt is cd followed by the folder path
To move from one folder to another in Command Prompt, type cd (which stands for "change directory") and then the name or path of the folder you want to enter. For example, if you want to go into a folder called Documents on your Desktop, you would type cd Desktop\Documents and press Enter. Command Prompt will then move you into that folder, and your prompt will show the new location.
The folder path tells Command Prompt exactly where to find the folder you want. You can type a folder name by itself if it is in your current location, or you can type a longer path that includes multiple folder names separated by backslashes if the folder is nested deeper in your computer's structure.
Key Takeaways
- Type cd followed by a space and the folder name or path, then press Enter to change folders.
- Use backslashes (\) to separate folder names when navigating through multiple nested folders.
- Type cd .. to move up one level to the parent folder that contains your current folder.
- Type dir to see a list of all folders and files in your current location before you navigate.
- Use cd / to jump to the root of your current drive, or type a drive letter like D: to switch to a different drive entirely.
How to navigate to a folder using its full path
If you know the complete path to the folder you want to enter, you can type the entire path at once. For example, cd C:\Users\YourName\Documents\Projects\Work will take you directly to the Work folder inside Projects inside Documents. Replace YourName with your actual username. The path starts with the drive letter (usually C:), followed by each folder name separated by backslashes.
This method is faster when you know exactly where you are going. You do not have to navigate through each folder one at a time. Command Prompt will move you to that location in a single command, as long as the path exists and you have typed it correctly.
How to move up to the parent folder
To go back up one level to the folder that contains your current folder, type cd .. (that is cd, a space, and two periods). This takes you to the parent directory. If you are in C:\Users\YourName\Documents\Projects and you type cd .., you will move to C:\Users\YourName\Documents.
You can also type cd ..\.. to move up two levels at once, or cd ..\..\.. to move up three levels. Each .. represents one level up in the folder structure. This is useful when you have navigated deep into nested folders and want to back out quickly without typing a full path.
How to see what folders are available before you navigate
Before you change folders, you may want to see what folders exist in your current location. Type dir and press Enter. Command Prompt will display 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.
Once you see the folder name you want to enter, you can type cd followed by that exact folder name. This prevents typing errors and helps you understand the structure of your computer's folders before you navigate. If you see a folder name with spaces in it, like "My Documents", you need to put the name in quotes: cd "My Documents".
How to switch between different drives
If your computer has multiple drives (such as C:, D:, or E:), you can switch between them in Command Prompt. To move to a different drive, type the drive letter followed by a colon, such as D: or E:, and press Enter. Command Prompt will switch to that drive, and your prompt will show the new drive letter.
Once you are on a different drive, you can use cd to navigate to folders on that drive just as you would on the C: drive. For example, after typing D:, you could then type cd Backups\Archive to go to the Archive folder inside Backups on your D: drive. If you want to go to the root (the top level) of any drive, type cd \ and you will move to the main folder of that drive.
Common mistakes and how to fix them
The most common error is typing a folder name that does not exist or misspelling it. If you type cd Documants instead of cd Documents, Command Prompt will show an error message saying "The system cannot find the path specified." Check your spelling and try again, or use dir first to see the exact folder name.
Another mistake is forgetting the backslash between folder names. If you type cd Documents Projects instead of cd Documents\Projects, Command Prompt will not understand the command. Always use backslashes to separate folder names in a path. Also remember that folder names with spaces must be enclosed in quotes, or Command Prompt will treat the space as the end of the command.
Frequently Asked Questions
What if I type a folder name and get an error message?
The folder name may be misspelled, or the folder may not exist in your current location. Type dir to see a list of all folders where you are right now. Find the exact spelling of the folder you want and type cd followed by that name. If the folder is in a different location, you may need to type the full path instead.
Do I have to use backslashes or can I use forward slashes?
Command Prompt on Windows requires backslashes (\) to separate folder names in paths. Forward slashes (/) do not work in Command Prompt. However, if you are using PowerShell or a Mac terminal, forward slashes are the standard. Stick with backslashes in Command Prompt.
How do I get back to the main user folder quickly?
Type cd %USERPROFILE% to jump directly to your user folder (usually C:\Users\YourName). This works from anywhere in Command Prompt and saves you from typing the full path. The %USERPROFILE% variable automatically points to your home directory.
Can I use tab to autocomplete folder names?
Yes. Type cd and the first few letters of the folder name, then press the Tab key. Command Prompt will autocomplete the folder name for you. Press Tab again to cycle through other folders that start with those letters. This is faster than typing the full name and reduces spelling mistakes.