First, you need to open the Command Prompt:
1. Press Win + R
to open the "Run" dialog box.
2. Type cmd
and press Enter
.
Suppose you are currently on the C drive and want to switch to the D drive.
1. Check the current drive: When you open CMD, by default, you will be on the operating system's drive, usually the C drive.
C:\Users\YourName>
2. Switch to the D drive: Simply type the drive letter followed by a colon and press Enter
.
D:
After pressing Enter
, the prompt will change to reflect the D drive.
D:\>
If you need to switch to a specific directory on another drive, first switch to that drive and then use the cd
(change directory) command.
1. Switch to the D drive:
D:
2. Change to the specific directory (e.g., D:\MyDocuments
):
cd MyDocuments
The prompt should now display the new directory:
D:\MyDocuments>
dir
to list files and folders in the current directory.
dir
cd \
to go back to the root directory.
cd \
Here is a complete example of how to switch from the C drive to the D drive and then navigate to a specific directory:
C:\Users\YourName> D:
D:\> cd MyDocuments
D:\MyDocuments>
This simple process allows you to switch drives and navigate through directories in CMD effortlessly.
Jorge García
Fullstack developer