How to Change Drive in CMD
In this guide, I’ll show you two simple ways to change drives in Windows CMD and PowerShell.
In the Windows command prompt (CMD), we use the cd
command to change from one directory to another. However, it only changes the path inside the current drive by default.
If you want to change to a different drive in CMD, you need to use the /d
switch.
cd /d e:
Using the CD Command
For example, I am working on the command prompt, inside the C:\Users\user1
folder. And If i try to change to another drive using the cd
command like this:
cd e:
It’s not going to work. As you can see, we are still in the C drive.

To make it work, you have to add the /d
option with the drive letter, like this:
cd /d e:
This time it works, and now we are in the E drive.

The Quick Shortcut
But you don’t have to type the cd
command every time. There is a very easy way to do this — you can just type the drive letter directly.
For example, if you want to go back to the C drive, just type:
c:
That will also work.

Works in PowerShell Too
This shortcut also works in PowerShell. For example, if you want to go to the E drive in PowerShell, you can simply type:
e:
Summary
That’s how we change drives in Windows CMD and PowerShell — either by using the cd /d
command or simply typing the drive letter. Both methods are quick and easy, so you can use whichever feels more convenient.