MiniTool

How to Change Drive Letter with CMD Windows 10

Diskpart is a command-line tool in Windows system that allows you to manage your disks and partitions. This post introduces how to change drive letter with CMD in Windows 10, namely, by using Diskpart CMD tool. MiniTool software provides users a free disk partition manager, data recovery software, system backup and restore software, etc.

If you want, you can change drive letter for a drive with CMD (Command Prompt) in Windows 10. This post includes detailed guides for how to use Diskpart command-line tool to change driver letter in CMD.

How to Change Drive Letter with CMD in Windows 10

Diskpart is a Windows built-in CMD tool that lets you easily manage hard drive and change drive letter. To change or assign drive letter in CMD, you can firstly open Diskpart utility in Command Prompt. Check the steps below.

Step 1. Open CMD in Windows 10

You can press Windows + R , type cmd , and press Ctrl + Shift + Enter to open elevated Command Prompt .

Step 2. Open Diskpart tool

In Command Prompt window, you can type diskpart command, and press Enter . This will open the Diskpart command-line utility.

Step 3. Change drive letter CMD

Next you can type the command line below to change drive letter in Command Prompt in Windows 10. Remember to press Enter after typing each command line.

  • list volume (this command will list all available volumes detected by your computer)
  • select volume * (replace “*” with the exact volume number of the target partition)
  • assign letter=* (replace “*” with the preferred drive letter like “F”)

Windows change drive letter

After you change or assign a drive letter for a drive or device, Windows will display the same letter automatically next time you reconnect the device to your computer.

If you want to remove the drive letter of a specific drive, you can type remove letter=* command and press Enter . Still, replace “*” with the exact drive letter of the target drive.

How to Change Drive Letter Using PowerShell

Some Windows 10 users might find that Command Prompt is missing from Win + X menu , and instead, it shows Windows PowerShell. Windows PowerShell can do most things that Command Prompt does. Alternatively, you can also use Windows PowerShell to change drive letter in Windows 10.

Step 1. Press Windows + X , and choose Windows PowerShell (Admin) to run Windows PowerShell utility as administrator.

Step 2. Next type get-disk command and press Enter to list all available drives the computer detected.

Step 3. Then you can type the command: Get-Partition -DiskNumber 1 | Set-Partition -NewDriveLetter F , and press Enter to assign a new drive letter. You should change “*” with the actual disk number of target drive, and replace “F” with the new drive letter you’d like to assign to the drive.

change drive letter PowerShell

MiniTool Partition Wizard – Professional Free Disk Partition Manager

Instead of using CMD or PowerShell to change drive letter for a drive in Windows 10, you can also utilize third-party free disk partition manager like MiniTool Partition Wizard to easily change drive letter and manage disk partitions on Windows 10.

MiniTool Partition Wizard let you easily create/delete/extend/resize/format/wipe partitions, convert partitions formats, migrate OS, clone disk, test hard drive speed , analyze hard drive space usage, check and fix disk errors , and more.

change drive letter with MiniTool Partition Wizard

By following the detailed guides above, you can easily change drive letter with CMD (Command Prompt), PowerShell or MiniTool Partitioon Wizard on Windows 10.

About The Author

Position: Columnist

How to assign permanent letters to drives on Windows 10

You can assign drive letters manually, and in this guide, we show you how on Windows 10.

change drive letter assignment command prompt

On Windows 10, when connecting a removable storage device or an internal hard drive, the system detects and assigns a drive letter automatically to make it usable. However, when reconnecting an external drive (such as a USB flash drive or SD or microSD cards), the system can end up assigning a different letter, which can be annoying.

If you want to see the same drive letter on a particular device, you can manually assign a permanent letter to any drive connected to your computer, and on Windows 10 , you can do this in at least three different ways, using Disk Management, Command Prompt, or PowerShell.

Using this approach will prevent Windows 10 from assigning a new letter or trying to set a letter already in use, which can cause conflicts. Also, it helps to select a drive letter that makes more sense to you.

In this Windows 10 guide, we walk you through several methods to manually assign a permanent letter to a drive, as long as you're connecting the drive to the same device and the letter isn't already in use.

How to assign a drive letter using Disk Management

How to assign a drive letter using command prompt, how to assign a drive letter using powershell.

To manage drive letters with the Disk Management tool, use these steps:

  • Open Start .
  • Search for Create and format hard disk partitions and click the top result to open the Disk Management experience.
  • Right-click the drive and select the Change Drive Letter and Paths option.

change drive letter assignment command prompt

  • Click the Change button.

change drive letter assignment command prompt

  • Select the Assign the following drive letter option.
  • Use the drop-down menu to assign a new drive letter. Quick tip: To avoid the system trying to assign the same letter to another drive, it's a good idea to start adding letters in backward order. For instance, instead of using D, E or F, it better to start with Z, Y or X when assigning a new letter.

change drive letter assignment command prompt

  • Click the OK button.
  • Click the OK button again.

Once you complete these steps, the drive will permanently retain the assigned letter, even after reconnecting it. However, if you connect the drive to another device, it may receive a different letter.

While the easiest way to assign a new drive letter is to use Disk Management, you can also use DiskPart in Command Prompt to perform the same task.

Get the Windows Central Newsletter

All the latest news, reviews, and guides for Windows and Xbox diehards.

To assign a drive letter using Command Prompt, use these steps:

  • Search for Command Prompt , right-click the result, and then select the Run as administrator option.
  • Type the following command to start DiskPart and press Enter : diskpart
  • Type the following command to list all the available volumes and press Enter : list volume
  • Type the following command to select the volume (drive) to assign a new letter and press Enter: select volume 3 In the command, make sure to change "3" to the number that represents the drive on your device.
  • Type the following command to assign a new drive letter, and press Enter : assign letter=Z The command assigns the letter "Z" to the drive assuming it's available. However, you need to make sure to change the letter for the one that you want to use.

change drive letter assignment command prompt

After completing these steps, similar to Disk Management, every time you reconnect the storage to the same device, Windows 10 should assign the same letter automatically.

Alternatively, you can also use PowerShell to change a drive letter on Windows 10 using these steps:

  • Search for PowerShell , right-click the result, and then select the Run as administrator option.
  • Type the following command to list the available drives and press Enter : Get-Disk
  • Type the following command to assign a permanent letter to the drive and press Enter : Get-Partition -DiskNumber 1 | Set-Partition -NewDriveLetter Z In the command, make sure to change "1" to the number that represents the drive that you want to modify, and change "Z" for the new letter that you want to use.

change drive letter assignment command prompt

Once you complete the steps, the drive will be accessible through File Explorer using the letter that you assigned, and Windows 10 won't try to change it.

Updated March 7, 2019: We revised this guide to make sure it's current with the latest version of Windows 10.

More Windows 10 resources

For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

  • Windows 10 on Windows Central – All you need to know
  • Windows 10 help, tips, and tricks
  • Windows 10 forums on Windows Central

Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.

  • 2 I'm thrilled with Warhammer 40,000: Space Marine 2's co-op experience — here's how it goes above and beyond
  • 3 AMD Ryzen 7 9700X review: While Intel suffers setbacks, Team Red takes the mid-range gaming CPU crown
  • 4 AMD Ryzen 5 9600X review: Cheaper and more efficient than ever, Zen 5 tempts with an entry-level gaming CPU
  • 5 Logitech decries subscription-based forever mouse that "is not an actual or planned product but a peek into provocative internal thinking on future possibilities"

change drive letter assignment command prompt

How-To Geek

How to change a drive letter on windows 10 or windows 11.

4

Your changes have been saved

Email Is sent

Please verify your email address.

You’ve reached your account maximum for followed topics.

The Microsoft Store in Windows Is Getting Better

The 6 best tools in windows 11 to help with remote work productivity, how i use microsoft word as a bullet journal to achieve my goals, quick links, what changing a drive letter does, how to change a drive letter, how to fix programs broken by changing a drive letter.

Changing the letter of a drive is easy on Windows 10 and Windows 11, but you should do it as soon as you add the drive to prevent future hassles. Find out how to change a drive letter here.

Windows assigns drive letters alphabetically --- starting with C --- when they're initialized. If you want to change a drive letter, you should do it before you install anything on the drive. Changing a drive letter after programs are installed could break them since there will be references to an installation location that is no longer there.

Windows has gotten pretty smart about updating shortcuts so that programs work after changing a drive letter. Most of your applications' shortcuts will probably be automatically corrected. Unfortunately, Windows isn't as good about updating file associations. You'll have to manually set the default apps associated with files to fix file associations if they were broken by changing the drive letter.

It is possible to change the boot drive letter to something else, but we don't recommend it. Changing C:\ to another letter is likely to result in severe issues, like a PC that cannot boot into Windows at all. Even if it were able to boot, there would be a huge number of programs that would not be able to run.

Technically speaking, while they are commonly called drive letters, each letter actually refers to a partition on a disk. If you have multiple partitions on a single disk, you will need to assign a letter to each partition to make them all accessible. If a disk has just a single partition, it will just have a single letter pointing to that partition. (However, you do not have to assign a letter to each partition. Partitions without drive letters will not appear in File Explorer and elsewhere.)

Changing a drive letter is pretty simple. Click the Start button, type "Disk Management" in the search bar, and then hit Enter.

The program name displayed in the search will not be Disk Management. It will be "Create and format hard disk partitions."

Start menu search showing disk manager result is not called disk manager

You could also hit Windows+X or right-click the Start button, and then click "Disk Management."

Click "Disk Management."

Identify the drive you'd like to change in the Disk Management Window. In this example, we'll change the letter of the D:\ drive to J:\. You can right-click the drive on the text list, or on the menu below. Either works.

Right click the drive in the list, or right click the drive on the menu at the bottom.

Select "Change Drive Letter and Paths" in the right-click menu that appears.

Click "Change Drive Letter and Paths."

In the window that pops up, click "Change."

Click "Change."

Select whatever letter you want from the drop-down menu. Then click "Ok."

Select letter from drop down menu, then click "Ok."

Two popups will warn you about changing your drive letter. Click "Yes" on both of them, and then restart your computer.

Once Windows has restarted, the drive letter should be changed.

Arrow pointing to change drive letter.

There are a few ways you can fix a program broken by changing the drive letter.

Fix The Shortcut

If you're lucky, the only thing that is broken is the shortcut. Fix a shortcut by right-clicking the shortcut on your desktop, and then click Properties.

Click "Properties."

You need to change the target of the shortcut to the new drive letter.

For example, if GIMP was previously installed at " D :\GIMP 2\bin\gimp-2.10.exe," and you changed the D drive to J, change the target of the shortcut to " J :\GIMP 2\bin\gimp-2.10.exe."

Finalize the change by clicking "Apply" and then "Ok."

Edit the shortcut. Then click "Apply" and "Ok."

Reinstall the Program

Reinstalling the program will generate new entries in the registry, so everything on the computer will know where to look for the program. Some installers won't like reinstalling directly over existing files, so you may need to rename or delete the old installation first.

Change the Drive Letter Back

If you changed the drive letter of a drive with a lot of programs installed, it might be easier to change the drive letter back. Changing the drive letter back should automatically fix any programs and file associations that were broken.

Edit the Registry

You can break programs, or even Windows itself, by editing the registry. Be careful, and learn about how to edit the registry before you try it. Make sure you backup the Windows registry first. You should not attempt this method unless you have no other options.

Windows, and a lot of programs, track where programs are installed via the Windows registry. It is possible to manually adjust the registry to fix broken programs. Keep in mind that there could be dozens of registry entries you need to edit. A program like GIMP can have registry entries for the context menu, for the "Open With" menu, for any file associations, and for the location of its executables. Other programs may only have a few entries related to where it is installed.

If you're not deterred, here's how you do it.

First, you need to know where the program was previously installed. In this case, the program was installed to the "D:\GIMP 2" folder, and the executables were found the "D:\GIMP 2\bin" sub-folder. It is now located at "J:\GIMP 2" instead.

We need to update the registry to reflect the change in location. Click the Start button, type "regedit" into the search bar, right-click Regedit, and click "Run as administrator."

Click "Run as administrator."

In Regedit, hit Ctrl+F to bring up a search window. Type in the old location for the program you're trying to fix --- "D:\GIMP 2" for our example --- then click "Find Next."

Click "Find next."

Once Regedit has found something with "D:\GIMP 2" as part of a path, it'll show it to you. Here is an example from the GIMP search.

Some of the GIMP search results found in the registry.

To actually change them, double click the name of the registry entry you want to modify. Then change the drive letter to J, or whatever you chose. If you didn't otherwise move the folder, leave the rest of the path alone. Then click "Ok."

Change the drive letter in Value Data.

You'll need to repeat this multiple times. To find the next result using your search term, you can hit the F3 key. There will be a popup once you've found all of the entries.

Changing drive letters can be a simple way to customize your PC. Do it before you install anything on the drive, however. You'll prevent any problems before they occur, and probably save yourself quite a bit of troubleshooting.

  • All about AI
  • Google Gemini AI
  • Inflection AI Pi Chatbot
  • Anthropic Claude
  • Multimodal AI
  • Generative AI
  • AI Image Generation
  • AI VIdeo Generation
  • AI Coding Assistants
  • AI Regulation
  • AI Research
  • Large Language Models (LLM)
  • Microsoft Azure
  • Google Cloud
  • Amazon Web Services (AWS)
  • Surface Pro
  • Surface Laptop
  • Surface Book
  • Surface Duo
  • Surface Neo
  • Surface Studio
  • Surface Hub
  • Surface Pen
  • Surface Headphones
  • Surface Earbuds
  • About WinBuzzer
  • Follow Us: PUSH, Feeds, Social
  • Join our Team
  • Cookie Policy and Privacy Policy
  • Terms of Service

How to Assign / Change Drive Letter in Windows 10

We show you how to change the drive letter in CMD, DIsk Management, PowerShell, and Registry editor in Windows 10.

https://winbuzzer.com/2020/08/07/bitlocker-for-windows-10-how-to-use-encryption-for-system-disk-partitions-or-any-other-drive-xcxwbt/

Table of Contents:

Windows 10 helpfully assigns drive letters to disks as they're added, but they aren't always the most logical choices. While we all know that C: is the system drive, it doesn't make quite as much sense to have D: as your games drive or E: as your media drive. Luckily it's quite easy to change a drive letter in Windows 10, and we're going to walk you through the process today.

How does Windows 10 drive letter assignment work?

For the most part, Windows 10 automatically assigns letters to drives as they're connected, in alphabetical order. However, there are a few exceptions to this rule that may leave some users confused.

As mentioned earlier, C: is always reserved for the system drive, but A: and B: are reserved too, for rarely used floppy drives. Because of Windows automatic assignment, you may have also noticed that Windows changes the drive letter of your USB stick if you've connected another before it.

If you want letters that are easier to identify in bios or don't want your USB letters jumping around, it's quite easy to permanently change a drive letter in Windows 10 to something of your choosing. We're going to cover a few different ways today, including how to change the drive letter in CMD.

How to Change Drive Letter in Windows 10 via Disk Management

The most user-friendly way to assign drive letters in Windows is through the Disk Management interface, which is relatively easy to use.

Start - Disk Management

How to Change Drive Letter in CMD using a DISKPART Disk Management Command

Though it's not quite as user-friendly, it can be much faster to change a drive letter with Command Prompt.

Windows 10 - Open Elevated Command Prompt

How to Change Drive Letter in Windows 10 with a PowerShell Disk Management Command

Those more familiar with PowerShell can use this method instead to achieve the same result.

Windows 10 - Open PowerShell as Admin

How to Change / Assign a Drive Letter via the Registry Editor

Alternatively, if none of the above methods worked or you're just feeling brave, you can modify the drive letter via the registry. Just be sure to read our safe registry editing guide first.

Windows 10 - Open Registry Editor

If you enjoyed this guide, you may want to consider enabling or disabling disk caching or turning on BitLocker for your newly customized drives.

Recent News

Adobe-Illustrator-Home-Own

Adobe Releases Illustrator Beta for ARM Windows Devices

Fulfilled-By-Amazon-Home-Own

Amazon Faces Recall Order for Over 400,000 Hazardous Products

change drive letter assignment command prompt

Meta Shuts Down Celebrity AI Chatbots Due to Low User Engagement

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Change a drive letter

  • 4 contributors
Applies To: Windows 11, Windows 10, Windows Server 2022, Windows Server 2019, and Windows Server 2016

If you want to change a drive letter assigned to a drive, or you have a drive that doesn't yet have a drive letter, use Disk Management to change it. You can also mount the drive in an empty folder so that it appears as a folder. For more information, see Mount a drive in a folder .

If you change the drive letter of a drive that already contains Windows or apps, apps might have trouble running or finding the drive. We suggest not changing the drive letter of a drive that already contains Windows or apps.

The following steps show how to change the drive letter.

Open Disk Management with administrator permissions.

In Disk Management, select and hold (or right-click) the volume on which you want to change or add a drive letter and select Change Drive Letter and Paths .

Screenshot showing the Disk Management window with the Change Drive Letter and Paths feature selected.

If you don't see the Change Drive Letter and Paths option or it's grayed out, the volume either isn't ready to receive a drive letter or it's unallocated and needs to be initialized . It might also be that the drive isn't accessible, which is the case with EFI system partitions and recovery partitions. If you've confirmed that your volume is formatted with a drive letter that you can access but you're still unable to change it, that's beyond the scope of this article. We suggest contacting Microsoft Support or the manufacturer of your PC for more help.

To change the drive letter, select Change . To add a drive letter if the drive doesn't already have one, select Add .

Screenshot of the Change Drive Letter and Paths dialog.

Select the new drive letter and choose OK . Then select Yes when prompted about how programs that rely on the drive letter might not run correctly.

Screenshot of the Change Drive Letter or Path dialog that shows how to assign a new drive letter.

Was this page helpful?

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback .

Submit and view feedback for

Additional resources

site logo

How to Change a Drive Letter in Windows

Sometimes when you plug in a USB device, it doesn't show up

Author avatar

A task you will most likely have to perform a few times in Windows is changing the drive letter for an external hard drive, mapped network drive, or DVD drive. Sometimes when you plug in a USB flash drive, it doesn’t automatically get a drive letter assigned to it and it may not show up on your computer.

In those types of cases, you have to change the drive letter for the device and it will normally pop right up. In this article, I’ll show you how to change the drive letter for these devices using the GUI and also via the command prompt.

Change Drive Letter via Disk Management

You can open disk management on a Windows PC by either right-clicking on the Computer or This PC icon on the desktop and choosing Manage or by clicking on Start and typing in diskmgmt.msc .

How to Change a Drive Letter in Windows image 1

You’ll see a list of volumes at the top and the disks and partitions at the bottom. Any partition that has a drive letter will be shown in the white area. If you connected a USB drive and you see it listed, but it doesn’t have a drive letter, you can now assign one.

To assign or change the drive letter for a disk or partition, simply right-click on it and choose Change Drive Letter and Paths .

How to Change a Drive Letter in Windows image 2

A window will pop up with the current drive letter, if there is one, and a couple of options. Here you want to click on Change .

How to Change a Drive Letter in Windows image 3

Next, you will choose the new drive letter from the dropdown list. You can pick from the letters A to Z.

How to Change a Drive Letter in Windows image 4

That’s about it. Click OK to close out all the dialogs and the drive should now show up in Windows with the new drive letter. If you’re having issues using the GUI interface or you simply feel more comfortable using the command prompt, read the instructions below on how to use diskpart.

Use DiskPart to Assign Drive Letter

If you need to change or assign a drive letter via the command prompt, you have to use the diskpart command. I’ve written a bit on how to use diskpart , which is really useful for many disk management tasks.

To get started, open an administrator command prompt in Windows by clicking on Start, typing in CMD and then right-clicking and choosing Run as Administrator .

How to Change a Drive Letter in Windows image 5

Now type in the following commands, each followed by the Enter key.

Above, you’ll replace x with the volume number in the list that corresponds to the drive you want to change and with the letter you want to assign to the drive. Here are the commands I ran for an external USB drive:

How to Change a Drive Letter in Windows image 6

You’ll also notice that under the Type column, external drives will show up as Removable . That’s a good way to check before you select a volume. You can also figure out which drive is correct by looking at the size and also looking at the Info column. Volume 0 in my case is the system partition, so I wouldn’t want to mess with that by accident.

Overall, it’s a fairly simple process and hopefully you won’t run into any problems. There are times, however, when things don’t work properly. Below are some possible reasons.

Troubleshoot Can’t Change Drive Letter in Windows

One problem that I have seen is that the Change Drive Letter option is simply greyed out. This can occur for a few reasons. One of the main reasons is the volume is not formatted in FAT or NTFS format. For example, if you are attaching a disk from a Mac computer, you will not be able to change the drive letter unless you format the drive into a compatible format.

Another reason is if the drive is set to read-only. If so, you’ll have to Google the steps to change the drive to allow read/write access.

How to Change a Drive Letter in Windows image 7

Also, if you don’t need any of the data on the volume in question, a simple solution is to delete the volume, which is normally never greyed out. Once you delete the volume, you can right-click again and create a new simple volume. Now you will be able to change the drive letter.

' src=

Founder of Help Desk Geek and managing editor. He began blogging in 2007 and quit his job in 2010 to blog full-time. He has over 15 years of industry experience in IT and holds several technical certifications. Read Aseem's Full Bio

Read More Posts:

change drive letter assignment command prompt

Sign up for our daily newsletter

  • Privacy Policy
  • Advertise with Us

6 Ways to Change the Drive Letter in Windows

Ojash Yadav

If your PC suddenly stops showing one of your internal drives in the file explorer or not list your external drive, it could be due to the OS getting confused with the drive letters. Simply changing your assigned drive letters can help you bypass this conflict. Here are six ways to change the drive letter.

1. Change the Drive Letter Using Settings

2. using command prompt, 3. disk management, 4. registry editor, 5. windows powershell, 6. drive letter changer software, frequently asked questions.

Also read: How to Clean Up and Make Space on Your Windows “C” Drive

Is It Safe to Change a Drive Letter in Windows?

Changing the drive letter is not entirely harmless and can cause significant problems based on the contents of your drive. If you have applications and software installed on your drive, those applications may cease to work.

For example, if you change the name of your D: drive to an F: drive, then the software installed in the D drive will still search for code in the D: file. While you can still access the data inside, there may be errors that will cause a nuisance in your day-to-day usage.

However, you may safely change the letter of some drives. If a partition simply includes data files that you rarely use, changing the drive letter may cause minor inconvenience, but nothing serious. The letters of external drives can almost always be changed without any problems.

  • Press Win + I to open the Settings app, then select the “System” tab. Scroll down and click on “Storage.”

Windows 11 Settings Storage Section

  • Scroll down on the right side and click on “Advanced storage settings.”

Advanced Storage Options

  • Under Advanced storage settings, click on “Disks & Volumes.”

Disk Volumes

  • Select the drive whose letter you want to change, then click on the “Properties” button for that drive.

Disk Volumes Properties

  • In the Drive Properties, you will find the option to change the drive letter of the selected drive.

Disk Volumes Change Drive Letter

  • Once you click on the option to change the drive letter, you will find a drop-down menu that will allow you to change the drive letter.

Choose Drive Letter

  • Click on the letter you want to assign.

Volume Data Drive Letter

  • Once you have selected your preferred letter, click on “OK” to confirm your choice.

System Change Drive Letter

Also read: How to Format a Drive in FAT32 in Windows

  • Search for the command prompt on the start menu by typing cmd , right-click on it, and select “Run as administrator”.

Search For Cmd

  • On the command prompt home screen, type:

Diskpart Utility Homescreen

  • Press Enter , then type:

List Volume

  • Press Enter. You’ll see a list of your system’s drives. Make a note of the volume number of the drive. In the example pictured, it’s “Volume 3”.

Cmd Select Volume

  • Type the following code:
  • Type the following code to assign the new letter:

Instead of “new drive letter,” type the letter you want. For example: assign letter=S

Diskpart Drive Letter Assigned

The drive letter will be changed to your preferred letter.

Also read: 8 Ways to Customize Windows Terminal

  • Right-click on the Windows button and open “Disk Management.”

Open Disk Management Utility

  • Under the “Volume” column, you will find the various partitions of your storage. You need to find the drive whose letter you’ll change and right-click on it.

Disk Management Select Drive

  • In the dialog box that appears, click on “Change.”

Change Drive Letter Button

  • Click the drop-down menu next to “Assign the following drive letter,” then select your letter and press “OK.”

Disk Management Select A New Drive Letter

  • A warning message will pop up. Click “Yes” if you are sure about your decision to change the drive letter.

Disk Management Apply Changes

Also read: Which Allocation Unit Size Is Best for Your Drive?

  • To change the drive letter through registry editor, first press Win + R to open the Run dialog and type regedit .

Search For Registry Editor

  • Type in the following address at the top of the application:

and press Enter .

Registry Editor Mounted Devices

  • Navigate to the list of binary keys. Select the key that corresponds to the drive letter that you want to change. For example, if we want to change the letter of the D: drive, we would look for “\DosDevices\D:”
  • Right-click on the selected registry and rename the drive letter to what you want, just as you would rename any other file.You will have to restart your computer for the effects to take place.

Registry Editor Rename

Also read: 16 Useful Windows Registry Hacks to Optimize Your Experience

  • Using the search button on the taskbar, search for “Powershell” and run it as administrator.

Windows Powershell

  • Type the following command:

Powershell Get Partition Command

  • A screen will show you your disk partitions. Make a note of what drive letter you want to change.

Administrator Windows Powershell Listing Drives

  • To change the drive letter, type the following command:

Make sure to substitute “current drive letter’ and “new drive letter” with the actual drive letters, then press Enter .

Windows Powershell Settings New Drive Letter

Also read: How to Map a WebDAV Drive in Windows

If you are looking for a tool that can help you manage your partition and drives, these software will help you change your drive letter.

  • MiniTool Partition Wizard
  • AOMEI Partition Assistant
  • EaseUS Partition Master

These tools are easy to use and have GUI interfaces that make them simple to use and also a one-stop destination for you to manage your storage devices. For the purposes of the demonstration, we are using MiniTool Partition Wizard to change the drive letter.

  • Download MiniTool Partition Wizard. (It is a direct download link.)

Minitools Installer

  • Run the installer and launch the app. You will get a listing of all your drive partitions mentioned below.

Minitool Partition Wizard Homescreen

  • Right-click on the target drive partition and select “Change Letter.”

Minitools Change Letter

  • Open the drop-down list and select a new drive letter for your target drive.

Se;ect A New Drive Letter In Minitool

  • Click on “Apply” to save the changes.

Minitool Click Apply

  • You will receive a warning pop-up asking you to close all background applications. Click “Yes.”

Minitool Apply Changes Warning

  • You will now receive a confirmation message telling you that the new changes have been applied.Click “OK.”

Minitool Changes Applied Dialouge Box

Also read: How to Format Your USB Drives in Windows

1. How are drive letters assigned in Windows?

Drive letters are assigned to every new drive in alphabetical order. Traditionally, the A: and B: drives were used for floppy disks, and the system drive on which Windows is installed is named C: by default.

2. Can I change the drive letter for the System Drive?

No, changing the drive letter on the system drive is not possible, as Windows is installed on the system drive. If that was changed, the system drive would not be found and the computer would cease working.

3. Can I switch drive letters among two drives?

No, there is no functionality in Windows to switch drive letters directly between two drives. If you want to switch the drive letters between the D: drive and the E: drive, you will have first change the D: drive to another letter (so as to free up the D:), change the E: to D:, then change the first one to E:.

Image credit: Plastic magnetic letters by 123RF

Our latest tutorials delivered straight to your inbox

Ojash Yadav

Ojash has been writing about tech back since Symbian-based Nokia was the closest thing to a smartphone. He spends most of his time writing, researching, or ranting about Bitcoin. Ojash also contributes to other popular sites like MakeUseOf, SlashGear, and MacBookJournal.

Windows Temporary Profile Featured 2

How to change Drive letter in Windows 11/10

Change drive letter in windows 11/10, 1] using command prompt, 2] using disk management, 3] using powershell, 4]  using registry editor.

How to change Drive letter in Windows

5] Using Drive Letter Changer software

At the edge of tweaking

Advertisement

Change the drive letter in the command prompt

  • Open an elevated command prompt .
  • Type diskpart .

Windows 10 Diskpart List Volume

You are done.

Change the drive letter in PowerShell

  • Open an elevated PowerShell instance .

Windows 10 PowerShell Get Partition

For example, the command can look as follows:

PowerShell Assign Drive Letter

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram , Twitter , and YouTube . View all posts by Sergey Tkachenko

One thought on “How to Change Drive Letter in Windows 10”

Really thank you this steps very helpful

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

transparent

Privacy Overview

css.php

How to Change Drive Letter in Windows 10 & 11

For example, I want to use the drive letter X for one of my partitions because one of my older scripts requires it. The script won’t work as intended if it doesn’t have that specific drive letter. Since these are older files, and there are many of them, in typical Windows fashion, I tend to swap the drive letter rather than making the necessary changes to the script files.

Thankfully, Windows has several ways to change the drive letter . You can use the built-in partition manager or execute a few commands in the terminal. I will show both ways, follow the method you like.

Note: Close all active programs except your browser before proceeding with the below steps. It will reduce potential conflicts between programs and the drives.

Important: Do not change the drive letter of system volume or boot partition (C drive).

Change drive letter using partition manager

Though most don’t know, Windows has a built-in partition manager called Disk Management. You can use it to quickly and easily change the drive letter. All you have to do is go to the drive options and choose the new drive letter.

Steps with more details:

First, search and open “Create and format hard disk partitions” from the Start menu. You can also use the “diskmgmt.msc” Run (Win + R) command.

After opening the Disk Management tool, find the drive you want to change the drive letter, right-click on it, and choose the “Change drive letter and paths” option.

change drive letter assignment command prompt

Now, click the “Change” button.

change drive letter assignment command prompt

Finally, close the Disk Management tool, and you are done.

That is all. You’ve successfully changed the drive letter in Windows. To make the changes take full effect, reboot the system.

change drive letter assignment command prompt

Commands to change drive letter

Press the Windows Key to open the Start menu . Type “ Command Prompt ,” right-click on the result, and select the “ Run as administrator ” option. You can also right-click the Start menu, choose “Windows Terminal (Admin),” and open the Command Prompt tab in it.

After opening the cmd window, type “ diskpart ” and press Enter. This will launch the diskpart program in the cmd window.

change drive letter assignment command prompt

Next, execute the “ select volume #number ” command. Don’t forget to replace the #number with the actual volume number.

change drive letter assignment command prompt

After selecting the volume, execute the “ assign letter=NewDriveLetter ” command. Replace “ NewDriveLetter ” with the actual drive letter you want to assign.

change drive letter assignment command prompt

Once assigned, close the cmd window.

That is all. Once the diskpart commands are executed successfully, the drive letter is changed instantly. To make the changes take full effect, reboot Windows.

I hope this simple and easy Windows how-to guide helped you.

Did you know you can change a drive icon to anything you want? Follow the linked article to understand how to do it.

About The Author

Avatar for Bashkarla

Leave a Comment Cancel Reply

How to change drive letter on Windows 11

Here are four ways to assign a different letter to a drive on Windows 11.

Avatar for Mauro Huculak

On Windows 11 , a “drive letter” is automatically assigned to each internal storage, USB drive, DVD drive, and map network drive to identify the volume and make it available on File Explorer or other applications. However, you can change the drive letter to anything you want without deleting the data on the storage. For instance, if you want a drive to use a specific letter related to the content, or the system tries to assign a letter already in use, preventing the storage from appearing on File Explorer and apps.

Whatever the reason, on Windows 11, you can assign a different drive letter in at least four ways using the Settings app, Disk Management, Command Prompt, and PowerShell.

A drive letter (or device letter) can be any character from the English alphabet. However, you cannot use the “C:” because it’s reserved for the main storage that contains the installation. Also, “A:” and “B:” are reserved letters that used to be assigned automatically to floppy drives.

This guide will teach you how to assign a new drive letter on Windows 11.

Change drive letter on Windows 11

  • Change drive letter from Disk Management on Windows 11

Change drive letter from Command Prompt on Windows 11

Change drive letter from powershell on windows 11.

To change the drive letter on Windows 11, use these steps:

Open Settings on Windows 11.

Click on System .

Click the Storage tab.

Under the “Storage management” section, click the “Advanced storage settings” option.

Click on Disks & volumes .

Open Disks & volumes

Select the drive with the volume with the letter to change.

Select the volume and click the Properties button.

Open driver properties

Click the “Change drive letter” button.

Change drive letter

Select the new drive letter for the device connected to Windows 11.

Assign drive letter on Windows 11

Click the OK button.

Once you complete the steps, the system will change the drive’s letter on Windows 11.

Change drive letter from Disk Management

To change the drive letter with Disk Management, use these steps:

Open Start .

Search for Create and format disk partitions and click the top result to open the Disk Management tool.

Right-click the volume and select the “Change Drive Letter and Paths” option.

Change drive letter and paths

Click the Change button.

Disk Management change drive letter

Select the “Assign the following drive letter” option.

Choose a different letter for the drive.

Disk Management assign new drive letter

Click the OK button again.

After completing the steps, the drive will appear in File Explorer with the new letter.

To add a new drive letter with Command Prompt, use these steps:

Search for Command Prompt , right-click the result, and select the Run as administrator option.

Type the following command to launch diskpart and press Enter :

Type the following command to list the volumes and press Enter :

Type the following command to select the volume (drive) to change the letter and press Enter :

In the command, change “2” for the number corresponding to the storage you want to change the letter.

Type the following command to change the drive letter on Windows 11 and press Enter :

In the command, change “H” for the letter you want to use with the drive.

DiskPart change drive letter

Once you complete the steps, the diskpart tool will assign the new letter to the storage.

To change a Windows 11 drive letter with PowerShell, use these steps:

Search for PowerShell , right-click the result, and select the Run as administrator option.

Type the following command to identify the hard drive to change the letter and press Enter :

Type the following command to assign or change the drive letter to internal or external and press Enter :

In the above command, change “0” with the disk number of the drive you want to format and “F:” with the letter you wish to assign to the storage.

PowerShell change drive letter

After completing the steps, the drive will have a new letter assignment. If the drive was previously missing, it will appear in File Explorer.

Avatar for Mauro Huculak

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter) , YouTube , LinkedIn and About.me . Email him at [email protected] .

  • How to upgrade Windows 7 to Windows 10 using clean install process
  • How to reset Settings app on Windows 10

We hate spam as much as you! Unsubscribe any time Powered by follow.it ( Privacy ), our Privacy .

  • troubleshooting

IT trip

  • CommandPrompt

Mastering Command Prompt: How to Change Drive Letters Effectively

change drive letter assignment command prompt

The Command Prompt in Windows is a powerful tool that often remains underutilized. One of its many capabilities includes the ability to change drive letters. This article delves into the intricacies of this process, providing a comprehensive guide for users seeking to manage their drive letters effectively.

Understanding the Command Prompt

The Command Prompt is a command-line interface that allows users to interact with their computer’s operating system through various commands. Before proceeding with drive letter changes, it’s essential to understand the basics of Command Prompt.

Opening Command Prompt

To open the Command Prompt, you can search for ‘cmd’ in the Windows search bar or run ‘cmd.exe’. It’s crucial to run it as an administrator for certain tasks, including changing drive letters.

Basic Commands

Familiarize yourself with basic commands like ‘dir’ (to list directory contents), ‘cd’ (to change directories), and ‘cls’ (to clear the screen).

Changing Drive Letters

Changing a drive letter in Windows using the Command Prompt involves using the Diskpart utility. This tool allows for advanced disk management, including the modification of drive letters.

Using Diskpart to Change Drive Letters

To change a drive letter using Diskpart, follow these steps:

1. Open Command Prompt as an administrator. 2. Enter ‘diskpart’ to start the utility. 3. Type ‘list volume’ to display all drives and their corresponding letters. 4. Identify the volume number of the drive you wish to modify. 5. Enter ‘select volume [number]’, replacing ‘[number]’ with the appropriate volume number. 6. Use ‘assign letter=[new letter]’ to change the drive letter, replacing ‘[new letter]’ with your desired letter.

Considerations and Warnings

Changing drive letters can have significant impacts on software and shortcuts that rely on specific paths. Ensure that the new drive letter doesn’t conflict with existing drive letters or system resources.

Advanced Command Prompt Tips

Beyond changing drive letters, Command Prompt offers a plethora of advanced functionalities.

Automation with Batch Files

You can automate repetitive tasks in Command Prompt using batch files. These are simple text files with a ‘.bat’ extension containing a series of commands.

System Management and Troubleshooting

Command Prompt is a valuable tool for system management and troubleshooting. Commands like ‘chkdsk’ (to check disk) and ‘sfc’ (System File Checker) are crucial for maintaining system health.

Changing drive letters through the Command Prompt is a straightforward process, but it requires careful consideration and understanding of the Command Prompt’s capabilities. This guide provides the necessary steps and considerations, empowering users to manage their systems more effectively.

Remember, while the Command Prompt is a powerful tool, it’s essential to use it responsibly, especially when making changes that can affect system configurations.

How to change a drive’s letter in Windows

How to change a drive’s letter in Windows

Windows assigns drive letters for all the hard disk drives, solid-state drives, optical media units, removable drives, and memory cards connected to your computer. Because the operating system does that on its own, you might be tempted to think that these drive letters cannot be changed. However, that is not true because Windows lets you change the drive letter of any drive as long as it is not already used for another. Here is how to change a drive’s letter in Windows 11 and Windows 10:

Skip to chapter

How to change a drive’s letter in windows 11’s settings, how to change a drive’s letter using disk management, how to change a drive’s letter in cmd (command prompt), how to change a drive’s letter with powershell, did you change any drive letters in windows.

NOTE: Except for the first method in this guide, which only applies to Windows 11, all the other methods for changing a drive’s letter work the same both in Windows 11 and Windows 10. Before you go ahead, keep in mind that changing the letter of the drive where Windows is installed is not recommended and cannot be done following the instructions in this guide. Also, you should know that changing a drive letter is generally safe and shouldn’t result in any data loss. That is… unless you’ve installed apps or games on the drive whose drive letter you want to change. In this case, those apps or games may stop running correctly.

Attempting to change the OS drive letter results in error

Attempting to change the OS drive letter results in error

If you’re using Windows 11, a straightforward way to change the drive letter of a partition or removable drive is offered by the Settings app. Open Settings ( Win + I ) and select System in the left sidebar. Then, on the right side of the window, click or tap on Storage.

Open Settings and go to System > Storage

Open Settings and go to System > Storage

Scroll down to locate the Storage management section. Then, click or tap on the Advanced storage settings .

Head to Advanced storage settings

Head to Advanced storage settings

In the expanded list of Advanced storage settings , click or tap on Disks & volumes .

Open the Disks & volumes

Open the Disks & volumes

This opens a new page where you can “View and manage properties of your disks and volumes.” Find the partition whose drive letter you want to change and click or tap the Properties button next to it.

Click Properties next to the drive

Click Properties next to the drive

This loads a new page in the Settings app where you can see and change some options regarding the partition or volume you’ve chosen. To set a new drive letter for it, click or tap the Change drive letter in the Volume data section.

Click Change drive letter

Click Change drive letter

Windows 11 will then ask you to “Choose which drive letter to use for this volume.” Click or tap on the currently displayed letter.

Choose which drive letter to use for this volume

Choose which drive letter to use for this volume

Select the new drive letter you want to use.

Select the new drive letter

Select the new drive letter

The new drive letter is now selected. To save your changes and assign the drive letter, click or tap on OK .

Assign the new drive letter

Assign the new drive letter

The drive letter has been changed. You can now close the Settings app and continue your work on your Windows 11 PC.

Another way to change the drive letter of a partition or removable drive is available in the Disk Management tool. Open the Disk Management : a quick method that works the same in both Windows 11 and Windows 10 is to use the WinX menu: right-click (or tap and hold) the Windows button on the taskbar and select Disk Management in the menu.

Open Disk management

Open Disk management

The Disk Management tool opens, and it should look similar to the screenshot below.

The Disk Management window

The Disk Management window

Find the drive whose drive letter you want to change and right-click on it (or press and hold on it if you are using a touchscreen). This action opens a context menu similar to the one in the next screenshot. In the menu, click (or tap) on the “Change Drive Letter and Paths” option.

Right-click the drive and select Change Drive Letter and Paths

Right-click the drive and select Change Drive Letter and Paths

Disk Management opens a small window called “Change Drive Letter and Paths for [Drive Letter]:.” In the field called “Allow access to this volume by using the following drive letter and paths,” you can see the letter that is presently used for that drive. For instance, one of my USB solid-state drives used the drive letter F .

The current drive letter

The current drive letter

Click or tap the Change button.

Click the Change button

Click the Change button

Another dialog window, Change Drive Letter or Path, opens. In it, there’s an option called “Assign the following drive letter.” On the right, you’ll find a list with all the letters of the alphabet that aren’t in use. The default value is the drive letter that is currently used by the drive you selected.

Assign the following drive letter

Assign the following drive letter

Click or tap on the drive letter list and select the new drive letter that you want to assign to the drive.

Choose the new drive letter

Choose the new drive letter

After you select the new drive letter, click or tap OK .

Assign the new drive letter

Windows might alert you to the fact that “Some programs that rely on drive letters might not run correctly.” . You should know that, in most cases, changing the drive letter is not an issue, and modern apps should not stop running correctly. If you’re using older programs, they may have problems running correctly if they need access to the drive in question. Windows gives you the option to continue or not. If you are still determined to change the drive letter, go ahead and press Yes .

Some programs that rely on drive letters may not run correctly

Some programs that rely on drive letters may not run correctly

If you’ve chosen to continue, the drive letter is instantly changed to the one you selected.

The drive letter was changed

The drive letter was changed

The drive letter has been changed so you can carry on with whatever you want to do on your Windows 11 or Windows 10 computer.

Did you know that you can change a drive’s letter in Windows using the command line, too? Here’s how it all works:

As an administrator user, open the Command Prompt or, if you prefer, launch Terminal and open a Command Prompt tab in it. Then, run this next command to access the disk partitioning tools:

Running diskpart in CMD

Running diskpart in CMD

To see all the volumes on your Windows 11 or Windows 10 computer, execute this next command:

In the output, find the volume you want to assign a new drive letter. In the example below, you can see that the one I want to change is marked as Volume 5 on my computer, and its current drive letter is N .

Find the volume

Find the volume

Once you’ve identified the drive that you want to change the drive letter for, you need to select it. To do so, run this command replacing [number] with the real number of your volume:

Select the volume

Select the volume

Finally, to change the drive letter of the selected volume, run this command replacing the letter X with the one you prefer:

Change the drive letter

Change the drive letter

That’s it: the drive letter has been changed. You can now either continue using diskpart for other disk operations, or you can close Command Prompt and continue working on your Windows PC.

PowerShell can also help you change drive letters in Windows, and using it actually feels a bit more structured. That’s because the sequence of commands in PowerShell follows more closely the real structure of a drive. The drive is the physical device that stores data, aka the hard disk or the solid-state drive. But to actually have access to the storage, a drive must have at least one partition, which is a logical division of the drive that, in turn, must also have at least one volume on it. The volume is the logical representation of the partition that can be accessed and used by the operating system and to which you can assign a drive letter.

Having said all that, to change a drive letter, launch PowerShell as admin or open a PowerShell tab in Windows Terminal . Then, run this command to see the drives installed on your Windows PC:

Once the results are in, identify the drive where the volume you want to change the drive letter is found. It shouldn’t be hard to find it, considering that you get to see the names of your drives as well as their size in the list. For instance, in the next screenshot, the drive I’m looking for is the one marked with the number 3, which is my portable 1TB solid-state drive.

See the drives installed

See the drives installed

Now that you know the drive, you need to find some information about the partition(s) on it. For that, run this command replacing the disk [number] with the one that applies to you:

Get information about the partitions

Get information about the partitions

In the output of the command, identify the partition you’re interested in: its current drive letter is listed in the DriveLetter column.

Identify the partition

Identify the partition

Now that you’ve gathered all the required information, you can change the drive letter. To to that, run this command replacing the [disknumber] and the [partitionnumber] with the ones you’ve identified earlier, and change the [driveletter] with the one you want to set:

In my case, for example, because I want to change the drive letter to N , the command looks like this:

Change the drive letter in PowerShell

Change the drive letter in PowerShell

The action is performed immediately, and if all goes well, you shouldn’t get any feedback from PowerShell . Thus, you can close it and carry on with whatever it is you want to do on your Windows computer.

As you have seen, changing drive letters in Windows is something you can do in a multitude of ways. If you want to organize your drives by changing their letters, now you know how to do it. Do you have something to add to this guide? For any additions or questions, don’t hesitate to leave a comment in the section below.

  • Subscribe to newsletter.

Receive our daily newsletter. You may unsubscribe at any time. For details read the Privacy policy.

Check this box if you agree to receive our emails.

You are subscribed to www.digitalcitizen.life .

.

Receive our weekly newsletter. You can unsubscribe at any time. For details, read our Privacy policy.

Related articles

Disk Management

7 things you can do with the Disk Management tool, in Windows

Partitions and drives

How to delete a partition in Windows 11 or Windows 10

2 ways to create a partition, in windows (all versions), how to hide or unhide a partition in windows.

5 Ways To Change Drive Letter In Windows 11, 10

Windows is programmed to assign drive letters automatically when a new partition is created. If you do not like the drive letter assigned to a partition, or for any other reason, you can change it.

For a partition to show up in Windows Explorer , it must have a drive letter assigned to it. Otherwise, you cannot access the partition. This is also true in case you attach a USB flash drive to your computer.

Table of Contents

On This Page

Is it possible to change system drive letter.

Before we discuss how to change a drive letter, we must inform you that you cannot change the drive letter of the system drive, after the operating system has been installed on it. This is because many dependent applications and programs are installed which require the complete path to files to function properly.

Please enable JavaScript

Similarly, if an app or program is installed on another partition other than the system partition, and it does not automatically pick up the changed path (which most modern apps usually do), you may have to make manual changes to the Windows Registries to provide the new path.

How to Change Drive Letters in Windows

Change drive letter using disk management console.

Follow the steps given below to change the partition’s assigned drive letter:

Right-click on the partition you want to change the letter for, and then click “ Change Drive Letter and Paths ” from the context menu.

From the pop-up wizard, click  Change .

[Conditional] You may then see another warning message. If you do, click  Yes  again, and then  restart  your computer for the changes to fully take effect.

Change Drive Letter using Command Prompt

If you are a command-line guy, you can also change the drive letter of a partition using the Command Prompt. Here is how:

Enter the disk partition mode by typing in the following, and then hitting Enter :

Change Drive Letter using PowerShell

Launch Windows PowerShell with administrative rights .

Change Drive Letter from Windows Registry

You can also change the drive letter directly from the Windows Registry. Here is how:

Note: Misconfiguration of critical values in the system’s registry could be fatal for your operating system. Therefore, we insist that you create a system restore point or a complete system image backup before proceeding forward with the process.

In the right-hand pane, look for the values whose name starts with “ \DosDevices .” This will display the current drive letters for the partitions on your computer.

Now restart your computer for the changes to take effect.

Use Drive Letter Changer

Drive Letter Changer is a third-party freeware that can be used to perform a number of different tasks, including changing a partition’s drive letter. Moreover, it is portable software, which means it does not need to be installed on your PC.

Run the application labeled “ dChanger .”

Right-click on the drive letter you want to change, expand “ Change drive letter ,” and then select a vacant drive letter that you wish to assign.

The drive letter will now change in an instant.

How to Swap Drive Letters Between Volumes

Unfortunately, there is no direct way of swapping drive letters between 2 partitions; you can only assign a vacant drive letter or remove it.

Swap Drive Letter from Disk Management Console

Open the Disk Management Console by typing in “ diskmgmt.msc ” in the Run Command box.

If prompted for a confirmation, click  Yes .

Now right-click on the primary partition again, and click “ Change Drive Letter and Paths ” from the context menu.

(Optional, but recommended) Now restart your computer so the changes can be finalized.

Swap Drive Letter using Command Prompt

You can also switch the drive letters between 2 partitions (or more) using the same logic. Here is how:

Enter the disk partition mode by typing in the following, and then hitting Enter .

Now assign the drive letter from the secondary partition to this volume.

You can apply similar logic to other methods to swap drive letters between 2 or more drives. This can be done using Windows PowerShell, Windows Registry, and the Drive Letter Changer software.

How to Fix Affected Programs After Changing Drive Letter

Change path for shortcut.

Right-click on the shortcut and click  Properties .

Revert Drive Letter

This is not an ideal case, but it will probably solve the problem.

Change Drive Letter in Windows Registry

Open the Registry Editor by typing in “ regedit ” in the Run Command box.

When the search wizard finds a match, double-click on the Value in the right pane, and then change the old drive letter with the new one in the text field under “ Value Data .”

After the computer reboots, check to see if the issue has been resolved.

Reinstall Program

If none of these methods have worked for you, you can try reinstalling the program. Simply delete the app, download the new setup from the vendor’s website, and perform a new install.

Closing Words

By default, Windows names a new volume as “New Volume.” You can change the name of the system volume, but cannot change its drive letter.

(Cancel Reply)

Get updates in your inbox.

  • Backup & Recovery
  • Hard Disk Manager
  • HFS+ for Windows
  • ExtFS for Windows
  • Disk Wiper Professional
  • Drive Copy Professional
  • Migrate OS to SSD
  • Paragon Alignment Tool Professional
  • NTFS for Mac
  • Hard Disk Manager for Mac
  • ExtFS for Mac

change drive letter assignment command prompt

Assign, change or remove Drive Letter with Diskpart

Diskpart is very powerful Windows Utility, which allows certain number of operation with hard disk. In this article we will show you how to assign, change or remove drive letter with Diskpart using.

Windows-10-x64-Original-2016-09-05-14-24-29

You bought hard drive for Backup, but it has automaticaly gained letter D . You want to change it to E . First we need to open Command Prompt with Administrator Rights.

Type cmd into the search box, and then right-click and choose Run as administrator. If you have Windows 10 use the CTRL + SHIFT + ENTER keyboard shortcut on Screen 1 , or click on Start with right click and choose Command Prompt (Admin) on Screen 2 .

cp001

When Command Prompt pops up, run the diskpart command.

run_dpt

Now we type list volume to list our volumes, we need to know the number of our volume.

list_vol

In our case our hard drive is Volume 3 and that number is 3 .

Now we use command select volume 3 to make changes to that volume. If your volume number is different, you need to replace number  3 with the number from your volume. After we have selected our volume we use command assign letter E , to assing letter E to our volume.

asn_let

Now you know how to change or assign another letter to your volume, also if you need you can remove volume letter with command remove letter E

rem_let

For security reasons you cannot change or remove your current system disk letter (esp C ), it will not work.

To exit diskpart type in exit .

exit

Enter your email and receive updates about special offers and exclusive content!

Connect with us for giveaways, exclusive promotions and last news!

change drive letter assignment command prompt

  • PC & Mobile

How to Change a Drive Letter in Windows 10

change drive letter assignment command prompt

Lee Stanton Lee Stanton is a versatile writer with a concentration on the software landscape, covering both mobile and desktop applications as well as online technologies. Read more November 19, 2022

Changing drive letters in Windows certainly has its benefits. You can hide a specific drive from all apps on your computer, thus preventing these apps from writing on a specific partition or edit the drive letter after adding a new HDD or SSD.

If you’re looking to change drive letters in Windows 10, you’ve come to the right place. In this article, we’ll provide you with detailed steps on how to change or remove various drive letters.

There are a couple of different ways to change a drive letter in Windows 10. Below, we’ll show you how to do so with Disk Management. This is the most straightforward way to apply changes to your drive letters in Windows 10.

change drive letter assignment command prompt

You have now successfully changed a drive letter in Windows 10.

How to Change Drive Letter in Windows 10 Using Command Prompt

Another way to change drive letters in Windows 10 is using Command Prompt. This process is relatively simple:

  • Make sure you’re running your PC in Admin mode.

change drive letter assignment command prompt

You have now changed your drive letter in Windows 10.

How to Remove a Drive Letter in Windows 10

If you want to remove a drive letter in Windows 10, you can do so from Desk Management. Just follow these simple steps:

change drive letter assignment command prompt

  • Click OK to confirm the operation.

You have now successfully removed a drive letter in Windows 10. After removing a drive letter, you won’t be able to see it in your File Explorer any longer. Also, to remove a letter, you must sign in as the administrator.

How to Change a Network Drive Letter in Windows 10

Changing a network drive letter in Windows is a pretty straightforward process. Just follow these steps, and you’ll be good to go:

change drive letter assignment command prompt

Additional Steps if You Receive an Error Message:

change drive letter assignment command prompt

You’ll now see your network share in the This PC screen.

How to Change a USB Drive Letter in Windows 10

You might want to change a USB drive letter in Windows 10 if Window Explorer doesn’t recognize the external hard drive. For this or any other reason, just follow the simple steps shown above for an HDD/SSD to change your USB drive letter.

How to Change DVD Drive Letter in Windows 10

Changing a DVD drive letter in Windows 10 can be done easily through Disk Management. Just follow the steps shown above to also change the DVD drive letter.

You have now successfully changed your DVD drive letter in Windows 10.

How to Change Recovery Drive Letter in Windows 10

Changing your recovery drive will only take a few seconds. Just as before, follow the directions shown previously to quickly change your recovery drive letter.

How to Change Boot Drive Letter in Windows 10

Unfortunately, changing your boot drive letter in Windows is not possible through Desk Management.

We only recommend changing your boot drive in case of an emergency. Otherwise, you shouldn’t make any changes to your boot drive. If you make a wrong step, you might not be able to run your system properly. For that reason, please follow the steps we’ve provided carefully. You should also make a system backup before proceeding any further.

Below, we’ll explain how to swap drive C and D letters. To assign your C drive with another letter, you should rename the \DosDevice\letter: value to another letter that’s not already in use.

Also, before you mess with the Register, it’s a good idea to create a copy of the Register before it’s been edited.

change drive letter assignment command prompt

  • Close the Registry Editor, wait a few seconds, and then open it back up.

change drive letter assignment command prompt

  • Click Rename .
  • Rename the file to a new drive letter \DosDevices\Z:. This will empty your C partition.
  • Locate the drive you wish to change the letter of. Find \DosDevice\D:. Right-click on it and click Rename .
  • Change the name to the new drive letter \DosDevice\C:.
  • Choose the appropriate value for \DosDevices\Z: and click Rename .
  • Change the name to \DosDevices\D:.
  • Close Regedit and open it back up.
  • Change the Admin permission settings to Read Only .
  • Restart your PC.

You have now successfully changed your boot drive letter in Windows 10.

Additional FAQs

Is it safe to change drive letters.

Changing drive letters is not a problem in itself. But if your computer needs to run a file that’s written in that very drive, you might have an issue. It’s not just for any reason that Windows warns you before changing a drive letter.

Generally, it’s not recommended to change drive letters unless that would help solve a specific issue. For example, if your Windows Explorer doesn’t recognize an external device under a certain driver, it’s okay to change its name.

There are some drives you can change the letters of without consequences. For example, to a partition that has files you rarely use. Also, you can change an external drive’s letter without problems.

Changing Drive Letters in Windows 10

In this article, we’ve provided you with some useful tips on how to change drive letters in Windows 10. Remember, only do this if strictly necessary, as it might cause some apps on your computer to not run properly.

Have you ever had to change your drive letters for a specific reason? Did you run into any problems? Share your experiences in the comments section below.

Related Posts

windows lock screen wallpaper

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.

N-Ways-to-Customize-the-Windows-11-Notepad-App

Afam Onyimadu July 25, 2024

How-to-Run-AI-Models-Locally-on-Windows-Without-Internet

Afam Onyimadu June 1, 2024

Connecting two AirPods to a Windows PC or Mac

Lee Stanton March 14, 2024

Send To Someone

Missing device.

Please enable JavaScript to submit this form.

  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

How to change drive letter from command prompt or powershell in windows

I wants to change my computer disk D:\ to E:\ from command prompt or powershell. Is there any way other than 'diskpart'?

  • command-prompt

ReshmaA's user avatar

  • what speaks against diskpart ? This would have been my suggestion. –  Marged Commented Sep 23, 2015 at 19:26
  • By "Computer Disk", do you mean System Disk (i.e. the Disk the OS is on, the Boot Disk)? –  nehcsivart Commented Sep 23, 2015 at 23:41

Assuming when you said "computer disk" you do not mean the System/Boot Disk, here is a solution using PowerShell. Note the variables. You can either replace them with the actual Drive Letters, or set them ahead of time.

Note here that $old and $new does not include the : character. So in your particular case (changing from D to E), you can use the following.

Note also that you will need Admin Rights. So run PowerShell as Admin.

nehcsivart's user avatar

  • 1 This also requires Server 2012 / Windows 8 and above. –  Brett Larson Commented Aug 31, 2016 at 21:27
  • 2 Also doesnt work on the DVD / CD drive as there is no 'partition' –  mhouston100 Commented Nov 11, 2016 at 0:41
  • 1 Get-Partition -PartitionNumber 1 | Set-Partition -NewDriveLetter X –  Ben Commented Nov 20, 2016 at 0:50
  • 1 @Timo You can do it with New-SmbMapping (to add a new one) and Remove-SmbMapping (to remove an old one). See [0] and [1]. [0]: learn.microsoft.com/en-us/powershell/module/smbshare/… [1]: learn.microsoft.com/en-us/powershell/module/smbshare/… –  nehcsivart Commented Mar 11, 2020 at 17:24

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged windows powershell command-prompt disk drive or ask your own question .

  • The Overflow Blog
  • This developer tool is 40 years old: can it be improved?
  • Unpacking the 2024 Developer Survey results
  • Featured on Meta
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Introducing an accessibility dashboard and some upcoming changes to display...
  • Tag hover experiment wrap-up and next steps

Hot Network Questions

  • Running the plot of Final Fantasy X
  • How to output the number of polygons in each face of a classic flat body?
  • What role can scrum master have/take when product owners differ from opinion?
  • Follow-Up on Assistant Professorship Offer Status
  • Trouble understanding how these stock prices are being reported
  • Can an MBA help somehow in reaching academic positions?
  • Some group conditions imply non-trivial centre
  • Does the sum of the reciprocal highly composite numbers converge or diverge?
  • Is Heaven real?
  • Check What Device is Powering my Mac
  • Why are big supercapacitors only available in 2.5-3 V, and not for example in 12 V or 24 V for easy installation parallel to batteries?
  • Old story about the shape of a robot and its ability to not break down
  • How would/could screens and touch screens hypothetically work for a species that evolved infrared vision?
  • How do I add a drain trap to a pedestal sink?
  • Confused with "per āera" in "Familia Romana"
  • Why is “water takes the steepest path downhill” a common approximation?
  • Why is my single speed bike incredibly hard to pedal
  • How do the Fremen harvest spice?
  • Schengen visa expires during my flight layover
  • Does space dust fall on the roof of my house and if so can I detect it with a cheap home microscope?
  • Addressing Potential JavaScript Injection Vulnerabilities
  • What's wrong with constructions like "Dragons are big, green, and eat people."?
  • Does the volume of air in an air tight container affect food shelf life?
  • Why did all countries converge on the exact same rules for voting (no poll tax, full suffrage, no maximum age, etc)?

change drive letter assignment command prompt

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Cannot change drive letter in command prompt (cmd) other than C:\ [duplicate]

Not sure what might have triggered this but I have noticed that while using the command prompt in windows 10 I am unable to change the drive using the cd command for any of the drive letters other than C:. I have also noticed that the autocomplete function works just fine when trying to change directory into a specific folder from the target drive but the change in the directory just doesn't happen.

Screenshots of the Disk Management tool and actual cmd prompt commands will follow:

Disk Management

Command Prompt

This behavior does not apply to PowerShell so I can successfully change the drives.

Isaz's user avatar

3 Answers 3

That's normal. For historical reasons, that's just how the cd command works in Cmd.exe, because that's how it worked in MS-DOS COMMAND.COM as well. The directory change is remembered (Cmd tracks it per-drive, as did MS-DOS), but you have to switch the actual drive separately – by typing just the drive:

The opposite would also work even though it would be very un-obvious:

(And note that when you use e.g. cd e: in your screenshot, this doesn't change anything, rather it shows you the current directory for that drive letter.)

However, Cmd.exe has a shortcut for changing both – the /d option makes cd work sanely:

The pushd/popd commands do not require amything extra, as they weren't present in MS-DOS and aren't burdened with compatibility. (I used to use doskey aliases [=pushd $* and ]=popd a lot.)

grawity_u1686's user avatar

  • +1 for mentioning pushd / popd as these work for network drives –  Dean Meehan Commented Jul 1, 2020 at 17:46
  • So you are telling me that after using windows for more than 20 years it's the first time I needed to change the drive and I've always needed to use /d in order to accomplish that? –  Isaz Commented Jul 1, 2020 at 20:56
  • @Isaz: ¯\_(ツ)_/¯ –  grawity_u1686 Commented Jul 1, 2020 at 21:40

cd [drive]:\directory will change the current directory “context” on that drive but won’t change to that drive itself.

If you subsequently just type [drive]:, it’ll change to that drive and remember the directory you previously “cd”’ed into.

CMD has always behaved like this.

PowerShell’s “cd” is an alias to Set-Location, which always changes the current drive as well as directory.

Greg W's user avatar

Just type the drive letter

Rajiv's user avatar

Not the answer you're looking for? Browse other questions tagged windows-10 .

  • The Overflow Blog
  • This developer tool is 40 years old: can it be improved?
  • Unpacking the 2024 Developer Survey results
  • Featured on Meta
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Introducing an accessibility dashboard and some upcoming changes to display...

Hot Network Questions

  • What role can scrum master have/take when product owners differ from opinion?
  • Terrain rising, controller not giving climb clearance... what to do?
  • How could ocean liners survive in a major capacity after large jet airliners become common?
  • Why is my single speed bike incredibly hard to pedal
  • Why would sperm cells derived from women's stem cells always produce female children?
  • Is it reasonable to request a justification for the moral axioms of an ethical system?
  • Does \setmainfont{Times New Roman} Produce Very Close to the Real Thing?
  • Does space dust fall on the roof of my house and if so can I detect it with a cheap home microscope?
  • How to cover large patch of damp?
  • Does the sum of the reciprocal highly composite numbers converge or diverge?
  • Groups killed by centralizing one element
  • How to proceed if my manager is ghosting me?
  • What is the English word for "tableau" in the context of the theatre?
  • Can I add a PCIe card to a motherboard without rebooting, safely?
  • is responding with "Entschuldigung?" to something I could not understand considered impolite?
  • Looking for an old Saturday morning live action show
  • Why did all countries converge on the exact same rules for voting (no poll tax, full suffrage, no maximum age, etc)?
  • Is it OK to call a person "sempai" who is actually much younger than you?
  • Word/phrase for avoiding a task because it has a lot of unknowns
  • Barrel adjuster built into Kona Rove frame
  • Expected Value of random variable in terms of hazard function
  • What's wrong with constructions like "Dragons are big, green, and eat people."?
  • Is this really a neon lamp?
  • Mathematica ignores my custom MenuSetup.tr (Windows 10)

change drive letter assignment command prompt

IMAGES

  1. How to Change Drive Letter in Windows 10

    change drive letter assignment command prompt

  2. How to Change Drive Letter with CMD Windows 10

    change drive letter assignment command prompt

  3. How to assign permanent letters to drives on Windows 10

    change drive letter assignment command prompt

  4. Change Drive Letter Using Command Prompt In Windows 10/8/7 [Tutorial]

    change drive letter assignment command prompt

  5. 3 Simple Ways to Assign a Drive Letter in Windows 10/8/7

    change drive letter assignment command prompt

  6. How to change Drive letter in Windows 11/10

    change drive letter assignment command prompt

VIDEO

  1. How to Change Drive Letter in Windows 10

  2. How to Change Drive Letter in Windows 10? [Easiest Way]

  3. Change Drive Letter Using Command Prompt In Windows 10/8/7 [Tutorial]

  4. How To Manually Assign Or Change A Drive Letter Using Command Prompt/Diskpart on Windows 10/11

  5. How To Manually Assign a Drive Letter using CMD in Windows 11

  6. How to Change Drive Letter in Windows 11

COMMENTS

  1. Manually assigning a drive letter using CMD/Diskpart

    Open up a command prompt (CMD/PowerShell). Type "diskpart" to start up diskpart. You will see the prompt change to "DISKPART>". Type "list vol" to list all available volumes. You can identify the drive by size and file system. Additionally, the volume doesn't currently have a drive letter. Select the volume using "sel vol <number>".

  2. How to Use the Diskpart Utility to Assign and Remove Drive Letters

    The Disk Management tool in Windows gives you an easy-to-use graphical interface to dealing with partitions and drive letters, but what if you want to just quickly change a drive letter on the command prompt? The diskpart utility makes it easy.

  3. How to Remove and Assign Drive Letters in Windows with Diskpart

    Assigning a new drive letter to a partition or removable device using Diskpart is really easy. First, search for the command prompt in the Start menu, right click on it and select the option "Run as administrator.". If you are using Windows 8, press "Win + X" to open the power user menu and select the option "Command Prompt (Admin).".

  4. How to Change Drive Letter with CMD Windows 10

    How to change drive letter in CMD in Windows 10? Check the detailed guides for how to change/assign drive letter in Command Prompt Windows 10.

  5. Change and Assign Drive Letter in Windows 10

    1 Open an elevated command prompt. 2 Type diskpart into the elevated command prompt, and press Enter. (see screenshot below) 3 Type list volume into the elevated command prompt, and press Enter. 4 Make note of the volume number (ex: 5) for the drive letter (ex: "F") of the drive (volume) you want to change.

  6. How to assign permanent letters to drives on Windows 10

    Open Start. Search for Command Prompt, right-click the result, and then select the Run as administrator option. Type the following command to select the volume (drive) to assign a new letter and ...

  7. How to Change a Drive Letter on Windows 10 or Windows 11

    Changing the letter of a drive is easy on Windows 10 and Windows 11, but you should do it as soon as you add the drive to prevent future hassles. Find out how to change a drive letter here.

  8. How to Assign / Change Drive Letter in Windows 10

    We show you how to change the drive letter in CMD, DIsk Management, PowerShell, and Registry editor in Windows 10.

  9. Change a drive letter

    Learn how to change or assign a Windows drive letter by using the Change Drive Letter and Paths feature in Disk Management.

  10. How to Change a Drive Letter in Windows

    If you need to change or assign a drive letter via the command prompt, you have to use the diskpart command. I've written a bit on how to use diskpart, which is really useful for many disk management tasks.

  11. 6 Ways to Change the Drive Letter in Windows

    Changing your assigned drive letter can help you bypass a conflict within the OS. Here are six ways to change the drive letter in Windows.

  12. How to change Drive letter in Windows 11/10

    Rename or assign a Drive letter using Command Prompt, Disk Management, PowerShell, Registry Edito or Drive Letter Changer software.

  13. How to Change Drive Letter in Windows 10

    By default, Windows 10 automatically assigns drive letters to connected drives, including internal and external drives. You might want to change these letters.

  14. How to Change Drive Letter in Windows 10 & 11

    Drive or partition letters are not fixed. You can change them. Here is how to change a drive letter in Windows 10 & 11 operating systems.

  15. How to change drive letter on Windows 11

    Whatever the reason, on Windows 11, you can assign a different drive letter in at least four ways using the Settings app, Disk Management, Command Prompt, and PowerShell.

  16. Mastering Command Prompt: How to Change Drive Letters Effectively

    The Command Prompt is a command-line interface that allows users to interact with their computer's operating system through various commands. Before proceeding with drive letter changes, it's essential to understand the basics of Command Prompt.

  17. How to change a drive's letter in Windows

    How to change a drive's letter using Disk Management Another way to change the drive letter of a partition or removable drive is available in the Disk Management tool. Open the Disk Management: a quick method that works the same in both Windows 11 and Windows 10 is to use the WinX menu: right-click (or tap and hold) the Windows button on the taskbar and select Disk Management in the menu.

  18. 5 Ways To Change Drive Letter In Windows 11, 10

    Windows is programmed to assign drive letters automatically when a new partition is created. If you do not like the drive letter assigned to a partition, or for any other reason, you can change it. Windows assigns drive letters in alphabetical order, starting with "C." "A" and "B" are reserved for floppy disk drives.

  19. Assign, change or remove Drive Letter with Diskpart

    In this article we will show you how to assign, change or remove drive letter with Diskpart using. You bought hard drive for Backup, but it has automaticaly gained letter D. You want to change it to E. First we need to open Command Prompt with Administrator Rights. Type cmd into the search box, and then right-click and choose Run as administrator.

  20. How to Change a Drive Letter in Windows 10

    Right-click on the drive you want to change a letter for and choose Change Drive Letter and Paths from the menu. Click Change. Windows will now ask you to assign a new name for your drive.

  21. How to change drive letter from command prompt or powershell in windows

    I wants to change my computer disk D:\\ to E:\\ from command prompt or powershell. Is there any way other than 'diskpart'?

  22. Change a drive letter from Command Prompt or batch script in Windows 8

    3. There are several methods: mountvol - use it once to delete an existing letter, then again to assign a new one; diskpart - interactive; diskmgmt.msc aka Disk Management - a graphical tool. Whichever you choose, assigning once should be enough, the assignment will be remembered afterwards. Share.

  23. Cannot change drive letter in command prompt (cmd) other than C:\\

    Not sure what might have triggered this but I have noticed that while using the command prompt in windows 10 I am unable to change the drive using the cd command for any of the drive letters other than C:. I have also noticed that the autocomplete function works just fine when trying to change directory into a specific folder from the target drive but the change in the directory just doesn't ...