How to Change Drive in Command Prompt (Windows Guide)

Navigating the Command Prompt is one of those skills that feels cryptic at first but becomes second nature quickly. One of the most fundamental tasks is switching between drives — moving from your C: drive to a D:, E:, or any other drive letter. This works differently than changing folders, and understanding why helps you avoid common mistakes.

Why Changing Drives in CMD Works Differently Than Changing Folders

In Windows Command Prompt, each drive maintains its own working directory. The cd command (short for change directory) moves you between folders on the same drive. If you try to use cd D: to jump to your D: drive while you're on C:, nothing will happen — or you'll get an error.

This is by design. Windows CMD treats each drive letter as a separate namespace, each with its own remembered location. That behavior traces back to the DOS architecture Windows was built on.

The Basic Method: Type the Drive Letter Followed by a Colon

The simplest way to switch drives is also the most direct:

D: 

Just type the drive letter and a colon, then press Enter. No cd, no backslash, no additional syntax. Your prompt will update to reflect the new drive, and you'll land wherever you last were on that drive.

Examples:

CommandWhat It Does
D:Switches to the D: drive
E:Switches to the E: drive
F:Switches to an external or USB drive
C:Returns to the C: drive

This works for any drive letter that Windows has assigned and that is currently connected or mounted.

Navigating to a Specific Folder on Another Drive

Switching to a drive and landing in a specific folder are two separate steps — unless you use the right flag.

Two-step approach:

D: cd D:ProjectsWork 

One-step approach using cd /d:

cd /d D:ProjectsWork 

The /d switch tells cd to change both the drive and directory in a single command. Without it, cd will not cross drive boundaries. This is arguably the most useful thing to know when working across multiple drives.

What Happens When a Drive Isn't Recognized 🖥️

If you type D: and receive an error like "The system cannot find the drive specified," there are a few likely causes:

  • The drive isn't connected — USB drives, SD cards, and external HDDs must be physically plugged in and recognized by Windows before CMD can access them.
  • The drive letter isn't assigned — Windows doesn't always auto-assign letters to every partition. Disk Management (accessed via diskmgmt.msc) lets you view and assign drive letters.
  • Network drives may need mapping — Shared network locations require a mapped drive letter before CMD can address them with a letter.
  • Virtual drives or disc images — These need to be mounted before they appear as a drive letter.

Running Command Prompt as Administrator can also matter. Some drive locations — particularly system partitions or drives with restricted permissions — behave differently depending on whether CMD was launched with elevated privileges.

Using CMD to List Available Drives

If you're not sure which drives are currently available, a few quick commands help:

wmic logicaldisk get name 

This returns a list of all recognized drive letters. Alternatively:

fsutil fsinfo drives 

Both commands give you a snapshot of what's currently mounted and addressable on the system.

Drive Navigation in Windows PowerShell vs. Command Prompt

If you're using PowerShell instead of CMD, the behavior is slightly different. PowerShell uses a provider model, meaning drives are accessed similarly but the environment handles paths more flexibly. You can still type D: and press Enter to switch drives in PowerShell, and cd works more uniformly across drive changes without needing the /d flag.

That said, for straightforward drive switching, classic Command Prompt and PowerShell both handle the core D: syntax identically.

Factors That Affect How This Works in Practice 🔧

Drive navigation in CMD is consistent by design, but real-world setups introduce variables:

  • Number and type of drives installed — A system with one SSD and no other storage has far fewer navigation decisions than one with multiple internal drives, a NAS, and rotating USB devices.
  • Drive letter assignments — These can shift if you add or remove hardware, which can break scripts or batch files that hardcode specific letters.
  • Partitioned drives — A single physical drive split into multiple partitions appears as separate drive letters in CMD, each navigated independently.
  • External and removable media — Drive letters for USB drives are assigned dynamically and may not be consistent across sessions or machines.
  • User permissions — Standard user accounts may encounter access restrictions on certain drive paths that an administrator account would not.

Scripts and automation that rely on drive navigation need to account for these variables explicitly — especially in environments where drive letters aren't static.

Practical Syntax Reference

:: Switch to D: drive D: :: Switch to E: drive E: :: Go to a specific folder on another drive (two steps) D: cd FolderName :: Go to a specific folder on another drive (one step) cd /d D:FolderName :: Go back to the root of the current drive cd :: List all available drives wmic logicaldisk get name 

The mechanics here are consistent across Windows 7 through Windows 11. What changes between setups is the drive landscape itself — how many drives exist, what they contain, how they're labeled, and what permissions govern them. Those variables are entirely specific to the machine and user in front of the keyboard.