The fastest way to switch drives in Command Prompt

To change from one drive to another in Command Prompt, type the drive letter followed by a colon and press Enter. If you're on your C: drive and want to go to D:, you type D: and press Enter. That's the entire command — no slash, no additional text needed.

This works for any drive letter your computer recognizes: external hard drives, USB flash drives, SD card readers, or secondary internal drives. The drive must be physically connected and visible in File Explorer for the command to work. If you type a drive letter that doesn't exist or isn't currently connected, Command Prompt will return an error message.

Once you've switched drives, your command prompt will show the new drive letter at the beginning of the line. Any commands you run after that will affect files and folders on the new drive, not your original location.

Key Takeaways

  • Type the drive letter with a colon (like E:) and press Enter to switch drives in Command Prompt.
  • The drive must be physically connected to your computer and visible in File Explorer for the command to work.
  • After switching, your command prompt display changes to show the new drive letter, confirming the switch was successful.
  • You can combine a drive change with a folder navigation in one command using cd /d D:\FolderName if you want to move to a specific folder on another drive.

Why the straightforward drive letter command sometimes fails

If you type D: and nothing happens — or you see an error — the drive either isn't connected, isn't recognized by Windows, or has a problem with its file system. Check File Explorer first to confirm the drive appears in the left sidebar under "This PC". If it's not there, the drive isn't mounted yet.

External drives sometimes need a moment to be recognized after you plug them in. Wait a few seconds, then try the command again. If the drive still doesn't appear in File Explorer, it may need to be initialized or formatted before Windows can use it — that's a separate process handled through Disk Management, not Command Prompt.

Switching drives and folders in one command

If you want to move to a specific folder on a different drive, you can do it in one step using the cd /d command. The /d flag tells Command Prompt to change both the drive and the directory at the same time. Type cd /d D:\Users\Documents and press Enter, and you'll move directly to that folder on the D: drive.

Without the /d flag, if you try to navigate to a folder on a different drive using just cd, Command Prompt will change your folder location but stay on your current drive — which can be confusing. The /d flag ensures both the drive and the path change together.

Listing what's on a drive after you switch

Once you've switched to a new drive, use the dir command to see what files and folders are there. Type dir and press Enter, and Command Prompt will display everything in the current location on that drive. This helps you confirm the drive switched correctly and shows you what you're working with.

You can also use dir /s to list everything in the current folder and all subfolders, or dir *.txt to show only files with a specific extension. These commands work the same way on any drive once you've switched to it.

Common reasons a drive won't show up in Command Prompt

A drive that appears in File Explorer but won't respond in Command Prompt usually has a file system issue or permissions problem. If you're trying to access a drive formatted for Mac (HFS+) or Linux (ext4), Windows Command Prompt may not recognize it without additional software. NTFS and FAT32 drives work without any extra tools.

If the drive is password-protected or encrypted, you may need to unlock it through File Explorer before Command Prompt can access it. Some external drives also require drivers to be installed before Windows recognizes them — check the manufacturer's website if a new drive doesn't appear in File Explorer at all.

Switching back to your original drive

To return to your C: drive (or whichever drive you started on), use the same command: type C: and press Enter. You can switch between drives as many times as you need in a single Command Prompt session. Each time you switch, the prompt updates to show your current drive letter.

If you've navigated deep into folders on one drive and want to go back to the root of another drive, the cd /d command is faster than switching drives and then navigating separately. Type cd /d C:\ to jump directly to the root of your C: drive from anywhere else.

Frequently Asked Questions

What if I type a drive letter and get "The system cannot find the path specified"?

The drive either isn't connected, isn't mounted, or Windows doesn't recognize it. Check File Explorer to confirm the drive appears under "This PC". If it's not there, reconnect it or restart your computer. If it still doesn't appear, the drive may need initialization through Disk Management.

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

Network drives mapped to a letter (like Z:) work the same way — type the letter and colon. If the network drive isn't mapped to a letter, you'll need to use the full network path with the net use command instead, which is more complex.

Does switching drives in Command Prompt affect anything on the other drive?

No. Switching drives only changes which drive your commands run on. It doesn't modify, delete, or access anything unless you explicitly run a command that does. straightforward typing a drive letter and switching is completely safe.

What's the difference between typing D: and typing cd D:\?

Typing D: switches to the D: drive and stays in whatever folder you were last in on that drive. Typing cd D:\ switches to D: and moves to the root folder. Both work; it depends on whether you want to return to your previous location on that drive or start fresh at the top level.