The cd command changes folders, but chdir or a drive letter changes which drive you're on
When you open Command Prompt, you start on your C: drive by default. To move to a different drive — D:, E:, F:, or any other letter your computer recognizes — type the drive letter followed by a colon and press Enter. That's it. Type D: and you're on the D drive. Type E: and you're on the E drive. This is different from the cd command, which moves you between folders on the same drive.
The reason this matters: if you try to use cd to navigate to a folder on a different drive, Command Prompt will tell you it can't find the path. You have to switch drives first, then navigate to the folder you want.
Key Takeaways
- Type a drive letter followed by a colon (like D:) and press Enter to switch to that drive in Command Prompt.
- The cd command moves between folders on your current drive, not between drives themselves.
- You can combine a drive switch with a folder path in one command by typing cd /d D:\FolderName.
- Use wmic logicaldisk get name to see all the drives your computer recognizes if you're not sure what letters are available.
Switching to a different drive with just the drive letter
Open Command Prompt and look at the prompt. It shows something like C:\Users\YourName>. The C: at the start tells you which drive you're on. To move to the D drive, type D: and press Enter. The prompt changes to D:\>. You're now on the D drive.
This works for any drive letter your computer has. External hard drives, USB flash drives, and SD card readers all get assigned letters. If your computer has a D, E, F, and G drive, you can type any of those letters to switch between them. If you type a drive letter that doesn't exist on your computer, Command Prompt shows an error message like "The system cannot find the path specified."
Why cd doesn't work across drives
The cd command (short for "change directory") only works within the drive you're currently on. If you're on C: and you try to type cd D:\Documents, Command Prompt won't switch drives — it will just tell you the path doesn't exist. This confuses people because cd looks like it should do everything, but it doesn't.
The reason is historical: Command Prompt inherited this behavior from older operating systems where each drive was treated as a separate environment. Modern Windows still works this way for backward compatibility. So the rule is straightforward: switch the drive first with the drive letter, then use cd to navigate folders on that drive.
Switching drives and navigating to a folder in one command
If you want to move to a specific folder on a different drive in a single command, use cd /d instead of just cd. The /d flag tells Command Prompt to change both the drive and the directory at the same time.
For example, if you're on C: and you want to go to a folder called Projects on your D drive, type cd /d D:\Projects and press Enter. Command Prompt switches to the D drive and navigates into the Projects folder in one step. The prompt now shows D:\Projects>. Without the /d flag, the same command would fail because cd alone can't cross drives.
Finding out what drives your computer has
If you're not sure which drive letters your computer recognizes, you can list them in Command Prompt. Type wmic logicaldisk get name and press Enter. Command Prompt shows every drive letter your computer has, including internal hard drives, external drives, and removable media that's currently plugged in.
You can also open File Explorer and look at the left sidebar under "This PC" — every drive shows up there with its letter. But the wmic command is faster if you're already in Command Prompt and don't want to switch windows.
What happens if a drive isn't ready or disconnected
If you type a drive letter for a USB drive or external hard drive that's been unplugged, Command Prompt shows an error: "The system cannot find the path specified" or "The device is not ready." This just means the drive isn't connected right now. Plug it back in, wait a few seconds for Windows to recognize it, and try again.
If you're trying to access a network drive (a folder shared from another computer on your network), the drive letter still works the same way — type the letter and press Enter. But if the network connection drops, you'll get a similar error. Reconnect to the network and the drive becomes available again.
Frequently Asked Questions
Can I use a forward slash instead of a backslash when typing a drive path?
Yes. Command Prompt accepts both D:\Folder and D:/Folder. Most people use backslashes because that's what Windows shows in File Explorer, but forward slashes work too. Pick whichever you find easier to type.
What if I type a drive letter and nothing happens?
The drive letter might not exist, or the drive might not be ready. Type wmic logicaldisk get name to see all available drives. If the drive you want isn't listed, it's either not connected or not recognized by Windows yet. Check File Explorer to see if it shows up there.
Do I need to type the full path every time I switch drives?
No. Just typing the drive letter switches you to the root of that drive. If you want to go directly to a specific folder, use cd /d D:\FolderName. Otherwise, type D: to switch to the drive, then use cd FolderName to navigate to folders from there.
Can I go back to the C drive the same way?
Yes. Type C: and press Enter, just like switching to any other drive. You're back on the C drive. If you want to return to a specific folder on C, use cd /d C:\FolderName.