The Basic Command to Change Drives

To switch drives in Command Prompt, type the drive letter followed by a colon and press Enter. If you want to move from your C: drive to your D: drive, you type D: and hit Enter. That's the entire command — Command Prompt will when ready show you're now on the D: drive by changing the prompt from C:\> to D:\>.

This works for any drive letter your system recognizes: E:, F:, G:, and so on. External drives, USB flash drives, and SD card readers all get assigned drive letters, and you can switch to any of them the same way. If you type a drive letter that doesn't exist on your system, Command Prompt will tell you "The system cannot find the path specified" — that just means there's no drive with that letter right now.

The colon is required. Typing just D without the colon won't work; Command Prompt will treat it as a command name instead of a drive switch.

Key Takeaways

  • Switch drives by typing the drive letter with a colon (D:, E:, F:) and pressing Enter.
  • The prompt will change to show your new drive letter, confirming you've switched successfully.
  • You can switch to any drive your system recognizes, including external drives and USB devices.
  • If you get an error message, the drive letter either doesn't exist or the drive isn't currently connected.
  • Switching drives doesn't delete anything or change your files — it only moves your working location in Command Prompt.

Why You Might Need to Switch Drives

Most of the time you're working in Command Prompt on your C: drive, where Windows and your programs live. But you may need to move to another drive to run a file, check what's on an external drive, or navigate to a folder that's stored elsewhere. Switching drives is the first step before you can use commands like dir (to list files) or cd (to change folders) on that drive.

If you're troubleshooting a hard drive problem, recovering files, or running a diagnostic tool that's stored on a different drive, you'll switch to that drive first. External drives and backup drives are common reasons — you might plug in a USB drive and need to see what files are on it, which means switching to that drive's letter.

What Happens When You Switch Drives

When you type a drive letter and switch, Command Prompt remembers your last location on that drive. If you were on D:\Backups\Photos the last time you used the D: drive, and you switch away to E:, then switch back to D:, you'll return to D:\Backups\Photos automatically. This is helpful when you're moving between drives repeatedly — you don't have to retype the full path each time.

Switching drives does not affect your files in any way. Nothing gets moved, deleted, or changed just because you changed which drive Command Prompt is looking at. You're only changing where Command Prompt is working, not modifying anything on the drive itself.

Checking What Drives You Have Available

If you're not sure what drive letters exist on your system, you can see them in File Explorer by opening "This PC" — all your drives will be listed there with their letters. In Command Prompt itself, you can type wmic logicaldisk get name to see a list of all drive letters your system recognizes. This is useful if you've just plugged in an external drive and aren't sure what letter it was assigned.

Another way is to type diskpart (which opens a different tool) and then list disk, though this shows physical drives rather than drive letters. For most situations, checking File Explorer is faster and clearer.

Common Errors When Switching Drives

The most common error is typing the drive letter without the colon — D instead of D:. Command Prompt will respond with "D is not recognized as an internal or external command" because it's looking for a program or command named D, not a drive. Always include the colon.

If you get "The system cannot find the path specified," the drive letter you typed doesn't exist on your system right now. This happens when you unplug an external drive, eject a USB stick, or try to access a drive that was removed. Plug the drive back in or check File Explorer to see what letters are currently available.

If a drive is connected but you still can't switch to it, the drive may not be formatted or recognized by Windows. This is a hardware issue beyond a straightforward drive switch — you'd need to check the drive in Disk Management or have it examined by a technician.

Moving Between Drives and Folders

Once you've switched to a drive, you can navigate folders on that drive using the cd command (change directory). For example, after switching to D:, you might type cd Backups to move into a folder called Backups. You can also use dir to list all the folders and files on the current drive, which helps you see what's available before you navigate.

If you need to go to a folder on a different drive entirely, you can either switch drives first and then use cd, or you can type the full path including the drive letter: cd D:\Backups\Photos will switch to the D: drive and move to that folder in one command. Both methods work; switching first is clearer when you're learning.

Frequently Asked Questions

Can I switch to a drive that's not plugged in?

No. If you try to switch to a drive letter that isn't currently connected, Command Prompt will tell you the path doesn't exist. Plug the drive in, wait a few seconds for Windows to recognize it, and try again. You can check File Explorer to confirm the drive is showing up before you try the switch in Command Prompt.

Will switching drives erase anything?

No. Switching drives only changes where Command Prompt is working — it doesn't modify, delete, or move any files. You're just changing your location, like walking from one room to another.

What if I switch to a drive and nothing happens?

If you don't see an error message but the prompt doesn't change, try typing the drive letter again and press Enter. Sometimes the command doesn't register on the first try. If the prompt still shows your old drive letter after you press Enter, the drive may not be recognized by Windows, or there may be a connection issue with the drive itself.

Can I switch to a network drive using the same method?

Network drives (mapped drives) work the same way if they've been assigned a drive letter. If your network drive is mapped to Z:, you can type Z: and switch to it. If it's not mapped to a letter, you'd use a different command — net use — but that's beyond a straightforward drive switch.