The cd command moves you to a different folder
To change folders in Command Prompt, type cd followed by the folder path you want to move to, then press Enter. For example, cd Documents moves you into your Documents folder. The folder you specify must exist, and you can only move to folders you have permission to access.
Command Prompt always shows your current location in the prompt line itself — usually something like C:\Users\YourName>. When you change folders, that path updates to show where you are. This tells you whether the cd command worked and keeps you oriented as you navigate deeper into your file system.
Key Takeaways
- Type cd FolderName to move into a folder that is inside your current location.
- Type cd .. (two periods) to move up one level to the parent folder.
- Type cd C:\Users\YourName\Documents to jump directly to any folder using its full path.
- Type dir to list all folders in your current location before you try to change into one.
- Wrap paths containing spaces in quotation marks: cd "C:\Program Files\My App".
Moving into a folder in your current location
If you are in C:\Users\YourName and you want to move into your Documents folder, type cd Documents and press Enter. Command Prompt will move you there, and your prompt will change to C:\Users\YourName\Documents>. The new path confirms the move was successful.
This only works if the folder exists in your current location. If you type a folder name that does not exist, Command Prompt will show an error: "The system cannot find the path specified." Check the spelling of the folder name and use dir to see what folders are actually there before you try again.
Folder names are case-insensitive in Command Prompt, so cd documents, cd Documents, and cd DOCUMENTS all work the same way. However, if a folder name contains spaces, you must wrap it in quotation marks: cd "My Documents".
Moving up to the parent folder
Type cd .. (cd followed by a space and two periods) to move up one level. If you are in C:\Users\YourName\Documents, typing cd .. takes you back to C:\Users\YourName. You can chain them together: cd ..\.. moves up two levels, and cd ..\..\.. moves up three levels.
This is useful when you have navigated deep into nested folders and want to go back without typing out a long path. Each .. represents one level up in the folder structure. You can move up as many levels as you need, but you cannot go above the root of your current drive.
Jumping to a folder using its full path
Instead of moving step by step, you can type the complete path to jump directly to any folder. Type cd C:\Users\YourName\Documents\ProjectFolder and press Enter to move straight there, no matter where you started. This is faster when you know exactly where you want to go.
Full paths always start with a drive letter (usually C:) followed by a backslash, then the folder names separated by backslashes. If any folder name in the path has spaces, wrap the entire path in quotation marks: cd "C:\Program Files\My App". Without the quotes, Command Prompt will stop at the first space and fail to find the folder.
Switching to a different drive
If you want to move to a folder on a different drive — for example, from your C: drive to a D: drive — type just the drive letter followed by a colon: D: and press Enter. Command Prompt will switch to that drive and show you the root folder of that drive.
After you switch drives, you can use cd normally to navigate folders on that drive. If the drive does not exist, is not connected, or is not accessible to your user account, Command Prompt will show "The system cannot find the path specified." External drives, USB flash drives, and network drives all appear as drive letters if they are connected and mounted.
Listing folders before you navigate
If you are not sure what folders exist in your current location, type dir and press Enter. This shows all files and folders in the current directory. Folders are marked with <DIR> next to their names, making them easy to spot among regular files.
Once you see the folder you want, copy its exact name (including capitalization and spaces) and use it in your cd command. This prevents typos and the "path not found" error. The dir command also shows the date and time each folder was last modified, which can help you find the right folder if multiple folders have similar names.
Frequently Asked Questions
What if I type cd and nothing happens?
Command Prompt may have moved you to the folder but the prompt did not update visibly on your screen. Press Enter again to refresh the display, or type cd with no folder name and press Enter — it will show you your current path.
Can I use forward slashes instead of backslashes?
In newer versions of Windows 10 and 11, Command Prompt accepts both forward slashes and backslashes in paths. Older versions require backslashes. If a forward slash does not work, use a backslash instead.
How do I get to a folder with spaces in its name?
Wrap the entire path in quotation marks: cd "C:\Program Files\My Folder". Without the quotes, Command Prompt stops at the first space and tries to find a folder called "Program", which fails.
What does "access denied" mean when I try to change folders?
Your user account does not have permission to open that folder. You may need administrator rights. Try opening Command Prompt as administrator by right-clicking it and selecting "Run as administrator", then try the cd command again.
Can I change folders to a network location?
Yes, if the network location is mapped to a drive letter on your computer. Type cd Z: (or whatever drive letter your network location uses) to navigate there. If it is not mapped, you can map it first through File Explorer or use the net use command.