Back to Homepage
Monday 10 February 2025
44

How to Change Drives in CMD

Open the Command Prompt

First, you need to open the Command Prompt:

1. Press Win + R to open the "Run" dialog box.

2. Type cmd and press Enter.

Basic Commands

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:\>

Navigate to a Specific Directory

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>

Additional Useful Commands

  • List directory contents: Use dir to list files and folders in the current directory.
dir
  • Return to the root directory of the drive: Use cd \ to go back to the root directory.
cd \

Complete Example

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.

Hashtags:
cmd
Share:
Created by:
Author photo

Jorge García

Fullstack developer