The Basic Command to Change Drives
To change from one drive to another in Command Prompt, type the drive letter followed by a colon and press Enter. If you are on drive C and want to move to drive D, type D: and press Enter. The prompt will update to show D:\>, confirming you are now on that drive.
This works for any lettered drive on your system — D, E, F, and so on. External drives, USB flash drives, and secondary internal drives all appear as letters in Command Prompt. If a drive is not assigned a letter, it will not show up this way, and you cannot switch to it using this method.
The colon is required. Typing just D without the colon will not work. Command Prompt will treat it as a command name instead of a drive reference.
Key Takeaways
- Type the drive letter followed by a colon (for example, D:) and press Enter to switch drives in Command Prompt.
- The prompt updates to show your new location, such as D:\>, so you can confirm the switch worked.
- Only drives that have been assigned a letter in Windows will appear as switchable destinations in Command Prompt.
- You can navigate to a specific folder on a new drive by typing the drive letter and the full path, such as D:\Users\Documents.
Checking Which Drives Are Available
Before you switch to a drive, you may want to see which drives exist on your system. Type wmic logicaldisk get name and press Enter. Command Prompt will list every drive letter currently assigned to your computer, including internal drives, external drives, and network locations if they are mapped.
Another way to see available drives is to type diskpart and press Enter, then type list disk. This shows physical disks rather than lettered partitions, so the output looks different. For most users, the wmic command is simpler because it shows the actual drive letters you can type.
Switching to a Specific Folder on Another Drive
You can combine the drive switch with a folder path in one command. Instead of switching to D and then navigating into a folder, type D:\Users\Documents and press Enter. Command Prompt will move to drive D and enter the Documents folder in one step.
If the path contains spaces, wrap it in quotation marks. For example, D:\Program Files\MyApp requires quotes: "D:\Program Files\MyApp". Without the quotes, Command Prompt will stop reading at the first space and fail to find the folder.
What Happens If a Drive Does Not Exist
If you type a drive letter that is not assigned to any physical or virtual drive, Command Prompt will display an error: The system cannot find the path specified. This means the letter you typed has no drive attached to it. Check that the external drive is plugged in, the USB is inserted, or the network location is still connected.
Drives can become unassigned if they are unplugged, unmounted, or if Windows has not yet recognized them. Reconnect the drive and wait a few seconds for Windows to detect it, then try the command again.
Returning to Your Original Drive
To go back to your original drive, type its letter and colon. If you started on C and switched to D, type C: and press Enter. You will return to the last folder you were in on drive C before you left.
If you want to return to the root of a drive (the top level, with no subfolder), the drive letter and colon alone will take you there. Typing C: from any subfolder on C will move you to C:\>.
Using cd to Navigate Within a Drive
Once you are on a drive, use the cd (change directory) command to move between folders on that same drive. Type cd FolderName to enter a subfolder, or cd .. to go up one level to the parent folder.
The drive-switching command (just the letter and colon) and the cd command work together. Switch drives with the letter, then use cd to navigate folders within that drive. You can also combine them in one line, as described earlier, to jump directly to a specific folder on a different drive.
Frequently Asked Questions
Why does my external drive not show up as a drive letter?
External drives must be recognized and assigned a letter by Windows before they appear in Command Prompt. Plug the drive in, wait 10 to 15 seconds, and check File Explorer to see if a new drive letter appears. If it does not, the drive may need a driver update or may not be compatible with your system.
Can I switch to a network drive using the same method?
If a network location is mapped to a drive letter in Windows, yes — type the letter and colon just as you would for a local drive. If the network location is not mapped to a letter, you will need to use the net use command to map it first, which is more complex and beyond basic drive switching.
What is the difference between typing D: and typing cd D:\?
Typing D: switches to drive D and keeps you in the same relative folder path if it exists on that drive. Typing cd D:\ explicitly moves to the root of drive D. For most purposes, D: is simpler and works the same way.
Does the drive letter change if I unplug and replug an external drive?
Usually no — Windows typically reassigns the same letter. However, if you plug the drive into a different port or if Windows detects a conflict, it may assign a different letter. Check File Explorer to confirm the current letter before using it in Command Prompt.
