The Basic Command to Change Directories
To change directories in Command Prompt, type cd followed by a space and the folder path you want to enter, then press Enter. For example, cd Documents moves you into your Documents folder. The folder must exist in your current location, or you need to type the full path from the root of your drive.
Command Prompt shows your current location at the start of each line. On Windows, it typically looks like C:\Users\YourName> or C:\Users\YourName\Documents>. The text before the > symbol tells you where you are right now.
Key Takeaways
- Type cd FolderName to enter a folder that exists in your current location.
- Type cd .. to move up one level to the parent folder.
- Type cd C:\FullPath\To\Folder to jump directly to any folder using its complete path.
- Type dir to see all folders in your current location before you change into one.
- Folder names with spaces must be wrapped in quotation marks, like cd "Program Files".
Moving Up to the Parent Folder
To go back up one level to the folder that contains your current folder, type cd .. (cd followed by two periods). Each time you run this command, you move up one level in the folder structure.
If you are in C:\Users\YourName\Documents\Work and type cd .., you will move to C:\Users\YourName\Documents. Type it again and you move to C:\Users\YourName. You can type cd .. multiple times in a row to climb several levels at once, or type cd ..\.. to move up two levels in a single command.
Using Full Paths to Jump Directly to Any Folder
Instead of navigating one folder at a time, you can type the complete path from the root of your drive. Start with the drive letter (usually C:), then type each folder name separated by backslashes. For example, cd C:\Users\YourName\Documents\Work\Projects takes you directly to the Projects folder.
Full paths are useful when you need to reach a folder deep in the structure and do not want to type multiple cd commands. You can also use this method to jump to a folder on a different drive — for example, cd D:\Backups moves to the Backups folder on your D: drive.
Handling Folder Names With Spaces
If a folder name contains spaces, you must wrap the entire name in quotation marks. For example, to enter a folder called "My Documents", type cd "My Documents". Without the quotes, Command Prompt treats the space as a separator and looks for a folder called just "My".
The same rule applies when using full paths. If any folder in the path has spaces, put quotes around the entire path: cd "C:\Program Files\My Application". This tells Command Prompt to treat the whole string as a single folder location.
Viewing Folders Before You Change Into Them
Before you change directories, you can see what folders exist in your current location by typing dir and pressing Enter. This command lists 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, type cd followed by that exact name. Using dir first prevents you from typing a folder name that does not exist, which would result in an error message like "The system cannot find the path specified."
Switching 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 just the drive letter followed by a colon — for example, D: — and press Enter. Your prompt will change to show D:\> or the current folder on that drive.
Once you are on the new drive, you can use cd commands to navigate folders on that drive just as you would on C:. You can also type a full path that includes the drive letter, like cd D:\Backups\Archive, to move to a specific folder on another drive in a single command.
Frequently Asked Questions
What does "The system cannot find the path specified" mean?
This error appears when you type a folder name or path that does not exist in your current location. Check the spelling of the folder name, make sure you are in the correct parent folder, and use dir to see what folders are actually available. If the folder name has spaces, add quotation marks around it.
Can I change to a folder on a network drive?
Yes. Type the full network path, which usually starts with two backslashes followed by the computer name or server name, like cd \\ServerName\ShareName\FolderName. Your computer must have permission to access that network location, and the path must be typed exactly as it appears in your network settings.
How do I go back to my home folder quickly?
Type cd %USERPROFILE% to jump directly to your user home folder (usually C:\Users\YourName). Alternatively, type cd \ to move to the root of your current drive, or type just the drive letter like C: to return to the root of that drive.
What if I type a folder name wrong?
Command Prompt will show an error message. Use the up arrow key to bring back your last command, edit the folder name, and press Enter again. Or type dir to see the exact spelling of the folder you want, then type the cd command with the correct name.