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.

assign drive letter windows 10 cmd

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.
  • Click the Change button.
  • 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.
  • 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.

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.

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.

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

Get the Windows Central Newsletter

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

Mauro Huculak

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

  • 2 Helldivers 2 players are sitting AFK to avoid server capacity queues, but Arrowhead is readying the boot
  • 3 This new Bethesda collection includes SEVEN great Fallout games on PC, and it's... Actually an awesome deal?
  • 4 The possibilities are (almost) endless with this Verizon Fios deal that gets you a $300 gift card
  • 5 Windows Central Podcast #340: Windows 11 version 24H2 confirmed!

assign drive letter windows 10 cmd

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

site logo

Assign Drive Letters to Folders in Windows

We'll show you 3 different methods to try

Author avatar

If there are folders that you access frequently, this post shows you how to quickly access these folders in Windows Explorer without having to enter the full path to the folder. We will discuss three ways to map folders to drive letters.

Method 1: Use the subst DOS Command

First, we will use an old DOS command, called subst , that allows you to assign a drive letter to any folder in Windows.

For this example, we will assign a drive letter for the following folder: C:\Users\Lori Kaufman\Documents\My Work .

Open the Start menu and enter “ cmd.exe ” (without the quotes) in the Search programs and files box. Click cmd.exe in the results to open the command prompt window.

Opening the command prompt window

In the command prompt window, type the following command to associate drive “ Y: ” with the folder.

NOTE: If there are spaces in the path name, be sure to put quotes around the full path.

Entering the subst command

Now, when we open Windows Explorer, we see a new drive labeled Y: that will directly open the My Work folder.

Drive Y: added

Use this same process to assign different drive letters to all your frequently used directories. However, the subst command cannot be used with mapped network folders.

Method 2: Use the psubst Utility

A disadvantage of using the subst command is that these virtual drives are temporary and will be removed as soon as you shutdown or restart the computer or log off. However, you can solve this by using the free psubst utility, which operates like the subst command but it creates permanent virtual drives that are persistent even after rebooting your computer.

Download the psubst utility from

https://github.com/ildar-shaimordanov/psubst

Now go ahead and read my post on how to use psubst to map a folder to a drive letter .

Method 3: Use a Graphical Tool

If you would rather use a graphical tool to map drive letters to folders, there is a free utility called, Visual Subst , that’s like a graphical version of the psubst utility.

Download Visual Subst from

http://www.ntwind.com/software/utilities/visual-subst.html

To install Visual Subst , double-click on the .exe file you downloaded.

Visual Subst executable file

On the Installation Options screen, select the check boxes for the Program Shortcuts you want to install and click Next .

Installation Options

When the setup is completed, click Close .  Double-click the shortcut to start the program. You can also start it from the Start menu.

Installation Completed

The main Visual Subst window displays. Select a desired drive letter from the drop-down list.

Selecting a drive letter

To select a folder to map to the selected drive letter, click the Browse button to the right of the edit box.

Clicking the Browse button

On the Browse For Folder dialog box, navigate to the folder you want to map, select it, and click OK .

Selecting a folder on the Browse For Folder dialog box

To map the selected folder to the selected drive letter, click the green plus button on the button bar to the left of the drive letter drop-down list.

Adding the selected=

The virtual drive is added to the list. Add more virtual drives by selecting a drive letter and a corresponding folder and adding it to the list as described above.

Virtual drive W: added in Visual Subst

If you want the virtual drives you defined available automatically when you start Windows, select the Apply virtual drives on Windows startup check box so there is a check mark in the box.

Applying virtual dries on Windows startup

To save the settings for Visual Subst , click the floppy disk button on the button bar. A file with the .ini extension is saved in the same directory where Visual Subst was installed.

Saving settings in Visual Subst

The mapped folders display as Hard Disk Drives in Windows Explorer.

Drive W: added in Explorer

If you want to remove the mapping for a folder, open Visual Subst again and select the virtual drive from the list. Click the red X button on the button bar.

Deleting a virtual drive in Visual Subst

Mapping folders to drive letters can save you a lot of time and Visual Subst makes adding virtual drives easy. Visual Subst works in Windows 2000, Windows XP, and later versions of Windows including Windows 7, 8 and 10. Enjoy!

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

assign drive letter windows 10 cmd

Leave a Reply

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

How-To Geek

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

You can change your drive letters in Windows 10 and 11 using the Disk Management utility.

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

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

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

Click

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

Select letter from drop down menu, then click

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

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

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

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

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 Bard
  • Inflection AI Pi Chatbot
  • Anthropic Claude
  • Generative AI
  • AI Image Generation
  • AI Regulation
  • AI Research
  • Large Language Models (LLM)
  • 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
  • Write for Us
  • 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/

  • 1 How to Change Drive Letter in Windows 10 via Disk Management
  • 2 How to Change Drive Letter in CMD using a DISKPART Disk Management Command
  • 3 How to Change Drive Letter in Windows 10 with a PowerShell Disk Management Command
  • 4 How to Change / Assign a Drive Letter via the Registry Editor

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.

  • Assign drive letter
  • assign drive letter windows 10
  • Change boot drive letter Windows 10
  • Change drive letter windows 10
  • change usb drive letter Windows 10
  • DIsc Management
  • Disk management command
  • how to change drive letter Windows 10
  • powershell change drive letter
  • win 10 change drive letter

Recent News

assign drive letter windows 10 cmd

Microsoft Edge Releases Patch for Data Import Glitch Amidst Unauthorized Data...

assign drive letter windows 10 cmd

Microsoft Announces Retirement of Azure IoT Central Service by 2027

assign drive letter windows 10 cmd

Microsoft Loop Enhances User Experience with Figma Integration

assign drive letter windows 10 cmd

Microsoft 365 Announces End of Life for Publisher by 2026

Subscribe to WinBuzzer on Google News

assign drive letter windows 10 cmd

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

TechRepublic

Account information.

assign drive letter windows 10 cmd

Share with Your Friends

How to assign a drive letter in Windows 10

Your email has been sent

Image of Bill Detwiler

When you connect a new drive to your PC, Windows automatically assigns the next available letter after C, which is normally used for your system drive. So an external hard drive or USB thumb drive could end up as D, E, F, or whatever, depending on how many drive letters are already being used.

This is all well and good, but what if you want to assign the drive a letter? Maybe you want to use M for your music files or X for your top-secret X-Files. Here’s how in Windows 10.

  • Ensure that the drive you’re relettering isn’t in use and that no files from that drive are open.
  • Right-click on the Start button.
  • Click Disk Management to open the Disk Management console.
  • Right-click the volume that has the drive letter you want to change.
  • Click Change Drive Letter And Paths.
  • Click the Change button.
  • Choose from a list of available drive letters. (Don’t use A or B, which have historically been reserved for floppy drives and can sometime confuse older software.)
  • Click Yes if a popup windows appears asking if you really want to do this.
  • Close the Disk Management console.

You may need to restart your machine for the change to take effect, but once you do the drive will use the new letter.

More Windows tips…

  • How to turn on or off hibernate in Windows 10
  • Regain hard disk space by using Windows Update Cleanup in Windows 7 and 8.x
  • Restore a Windows XP backup in Windows 8
  • How to replace SkyDrive with Libraries in Windows 8.1
  • Pro tip: Use an optical Recovery Drive in Windows 8.1

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Create a TechRepublic Account

Get the web's best business technology news, tutorials, reviews, trends, and analysis—in your inbox. Let's start with the basics.

* - indicates required fields

Sign in to TechRepublic

Lost your password? Request a new password

Reset Password

Please enter your email adress. You will receive an email message with instructions on how to reset your password.

Check your email for a password reset link. If you didn't receive an email don't forgot to check your spam folder, otherwise contact support .

Welcome. Tell us a little bit about you.

This will help us provide you with customized content.

Want to receive more TechRepublic news?

You're all set.

Thanks for signing up! Keep an eye out for a confirmation email from our team. To ensure any newsletters you subscribed to hit your inbox, make sure to add [email protected] to your contacts list.

  • PC & Mobile

How to Change a Drive Letter in Windows 10

assign drive letter windows 10 cmd

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.

How to Change a Drive Letter in Windows 10

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.

assign drive letter windows 10 cmd

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.

assign drive letter windows 10 cmd

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:

assign drive letter windows 10 cmd

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

assign drive letter windows 10 cmd

Additional Steps if You Receive an Error Message:

assign drive letter windows 10 cmd

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.

assign drive letter windows 10 cmd

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

assign drive letter windows 10 cmd

  • 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

assign drive letter windows 10 cmd

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

How to Disable Pop-Up Blocker

Lee Stanton February 19, 2024

microsoft edge logo on a gradient background.

Aman Kumar February 13, 2024

Top speech to text software

Lee Stanton February 9, 2024

Send To Someone

Missing device.

Please enable JavaScript to submit this form.

assign drive letter windows 10 cmd

Lee Stanton April 1, 2023

How to See Google Search History

Steve Larner March 7, 2023

assign drive letter windows 10 cmd

Lee Stanton August 23, 2022

assign drive letter windows 10 cmd

Lee Stanton August 16, 2022

how to download photos from google photos

Cassandra McBride December 3, 2022

assign drive letter windows 10 cmd

Lee Stanton February 20, 2023

More Recovery Products

  • Partition Manager     Partition Master Personal disk manager   Partition Master Enterprise Business disk optimizer   Edition Comparison Partition Master Versions Comparison   Disk Copy Hard drive cloning utility Partition Master Free Partition Master Pro

Centralized Solutions

MSPs Service

Screen Capture

Video Toolkit

Audio Tools

Transfer Products

File Management

iOS Utilities

More Products

  • Support     Support Center Guides, License, Contact   Download Download installer   Chat Support Chat with a Technician   Pre-Sales Inquiry Chat with a Sales Rep   Premium Service Solve fast and more

EaseUS Partition Master

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

How to assign a drive letter in Windows 10/8/7? This post covers three ways to assign a drive letter by using Disk Management, a partition manager, and Diskpart in CMD.

 Windows 11/10/8/7  100% Secure

assign drive letter windows 10 cmd

Total downloads

Page content

About the Author

Hot topics in 2023.

assign drive letter windows 10 cmd

What Is a Drive Letter

A drive letter is an alphabetic character identifying a physical computer disk or drive partition. Windows will assign an accessible drive letter by default, to any storage device. It starts from A to Z, going through all the alphabet. Windows will assign an accessible drive letter by default, to any storage device.

The system reserves the drive letters A: and B: for the floppy drive and portable media, such as tape drives. Even if your computer doesn't have these drivers installed. But you can still assign such letters manually if you wish. On computers with hard drives, the default drive letter is always C:. The CD-ROM or other disc drive is the last drive letter (e.g., D:). It's because C: is the first drive letter available on a hard disk. The drive letter C: can only be assigned to the drive on which Windows or MS-DOS is installed.

Windows will always be the drive letter C:,  even if you have several operating systems running. Most modern desktops and laptops now have hard drives and disc drives, like DVD drives, but not floppy disks. Even in this case, the C: drive is assigned to the hard drive, and the D: drive is assigned to the DVD drive.

Windows assigns the last drive letter to flash drives, smartphones, and other drives. For example, if the last drive letter was F:, and you plug a new drive, it is allocated as a G: drive until you unplug it. If you install more drives or create new partitions, they are allocated to drive letters other than C:, like D:, E:, F:, G:, and so on. Instead of the drive letter given by Windows, you may alter it to any other accessible drive letter.

How Assigned Drive Letters Work

You can alter the drive letter assigned by Windows. In the case you alter a drive's drive letter, the registry saves it per drive and volume ID. This does not permanently assign a drive letter to the device. The drive letter on your PC may change if you unplug the device or if you alter it.

If you use many USB drives, you may have observed that the drive letter changes each time you attach one. When non-assigned drives are attached, the letters D and onwards are assigned in turn. If the assigned drive is not attached, Windows will assign its drive letter to another drive. If you connect the drive with the given drive letter later, it will be assigned the next available letter.

Windows gives you several options for changing the drive letter of your computer. With this guide, you'll learn how to assign drive letters using three different tools. We will use Disk Management, EaseUS Partition Master, and Windows Command Prompt.

Extended Reading: Drive Letter Not Available

Assign a Drive Letter on Windows 10 with Disk Management

The Disk Management utility that comes with Windows lets you manage your disks. Change drive letters , create new partitions, delete existing partitions, and more.

Follow the steps below to change the drive letter.

Step 1. You will need to open Disk Management with administrator privileges. Right-click on the Start button, then choose Disk Management.

open disk management

Step 2. In the Disk Management window, right-click the volume you want to change or add a drive letter. Then click "Change Drive Letter and Paths".

choose change drive letter

Step 3. Pick "Change" to alter the drive letter. Or pick "Add" to add a drive letter for drives without one.

assign drive letter

Step 4. Choose a new drive letter, click "OK". The Disk Management will warn you that some programs might not run properly. Just close the window by clicking "Yes" to confirm.

disk management assign letter

Assign and Change Drive Letter with EaseUS Partition Manager

Your team is working on a project and you need to copy some files to a USB drive. But you have no idea what is the drive letter of the USB of your team. Most people have dealt with this issue before. As an easy solution, you can assign a drive letter to each driver using EaseUS Partition Master .

Users can manage disks with EaseUS Partition Manager without needing to go through a lengthy process. This program also provides advanced features such as  resize/move partition to solve low disk space issues, merge partitions, clone disk , create/delete/format partition, wipe data, disk/partition conversion, etc.

Now, free download this easy partition tool to assign drive letters with simple clicks.

Step 1.  Run EaseUS Partition Master, right-click the target partition, and choose "Change Drive Letter".

Step 2.  In the new window, click the down arrow and choose a drive letter for the partition from the drop-down menu, then click "OK".

Step 3.  Click the "Execute 1 Task(s)" button in the top-left corner, check the changes, and click "Apply" to change the drive letter of the selected partition.

Assign a Drive Letter Windows 10 Using Command Prompt

Windows Command Prompt can be used to assign drive letters to any directory on a computer. It especially benefits users with many storage devices connected to their computers. Below, we will show step-by-step how to change a drive letter with the command prompt.

Step 1. Access the elevated command prompt. Press Windows + S to run the search box. Type cmd . When the command prompt appears, right-click and select "Run as administrator".

open cmd

Step 2. Type diskpart at the command prompt. Press Enter.

command prompt type diskpart

Step 3. Type list volume , then press Enter.

command prompt  type list volume

Step 4. Pay attention to the volume number of the drive you want to change the letter. Type select volume . Substitute volume number by the number of the volume inside the <>.

select volume

Step 5. Type assign letter . Substitute the new drive letter with the new letter for the drive inside the <>. Done. After finishing, you can close the command prompt.

assign letter

You can assign different letters for your drivers in various ways. For example, with Windows Disk Management, and from the command prompt. But EaseUS partition manager gives you total control over your hard drive.

EaseUS Partition Master will assign a drive letter to any drive or partition and much more. Besides changing drive letters, you can also delete, split and wipe partitions. All without having to restart your PC several times or risk losing data. These features allow avoiding complicated procedures when working with multiple partitions.

How Can We Help You

assign drive letter windows 10 cmd

Updated by Tracy King 

Tracy became a member of the EaseUS content team in 2013. Being a technical writer for over 10 years, she is enthusiastic about sharing tips to assist readers in resolving complex issues in disk management, file transfer, PC & Mac performance optimization, etc., like an expert.

Read full bio

assign drive letter windows 10 cmd

Written by Cedric 

Cedric Grantham is a senior editor and data recovery specialist of EaseUS. He mainly writes articles and how-to tips about data recovery on PC and Mac. He has handled 10,000+ data recovery cases and is good at data recovery of NTFS, FAT (FAT32 and ExFAT) file systems, and RAID structure reorganization.

Product Reviews

 Product Reviews

I love that the changes you make with EaseUS Partition Master Free aren't immediately applied to the disks. It makes it way easier to play out what will happen after you've made all the changes. I also think the overall look and feel of EaseUS Partition Master Free makes whatever you're doing with your computer's partitions easy.

Partition Master Free can Resize, Move, Merge, Migrate, and Copy disks or partitions; convert to local, change label, defragment, check and explore partition; and much more. A premium upgrade adds free tech support and the ability to resize dynamic volumes.

It won't hot image your drives or align them, but since it's coupled with a partition manager, it allows you do perform many tasks at once, instead of just cloning drives. You can move partitions around, resize them, defragment, and more, along with the other tools you'd expect from a cloning tool.

Related Articles

How to Split Partitions with EaseUS Partition Master?

author icon

How to Test NVMe I/O Speed on Windows and Mac? [2024 Checklist]

author icon

Blue Screen of Death Is Changing to Black, How to Fix Windows 11 Black Screen of Death

author icon

How to Upgrade Xbox One X to SSD - Guide with Pictures

author icon

Fix 100% disk usage

partition hard drive in Windows 10

Partition Windows 10

Format USB in CMD

Format USB Using CMD

Convert MBR to GPT

Convert MBR to GPT

Combime partitions

Combine/Merge Partitions

Fix Windows can not be installed to this disk

Selected Disk is GPT

C drive is out of space

C Drive Is Full

Transfer Windows 11/10 to new drive

Transfer Windows 11 to New Drive

Get EaseUS Partition Master

Your best companion for disk partitioning, MBR to GPT/GPT to MBR conversion,even OS migration

assign drive letter windows 10 cmd

Copyright ©   EaseUS. All rights reserved.

The Best Windows Disk Partition Manager and PC Optimizer

assign drive letter windows 10 cmd

  • DiskPart Command Line Utility >

[Free Guide]: Use Diskpart Assign Drive Letter in Windows 11, 10, 8, 7

This post will show you how to use Diskpart assign drive letter in Windows 11, 10, 8, 7. In addition, another free GUI software will be introduced to assign or remove the drive letters.

Cherry

By Cherry / Updated on November 9, 2023

twitter

│ Use Diskpart to assign drive letter

│ assign drive letter via disk management, faqs about how to use diskpart to assign drive letter, why use diskpart to assign a drive letter.

As we all know, Windows assigns drive letters to all available drives on your computer, such as internal hard drives, optical drives, SD cards, and external USB drives. A drive letter is an alphabetical identifier for a volume, and each drive letter can be used once on a computer.

But sometimes, users want to change the original drive letter to another drive letter. Or due to some operation, the drive letter will not be available and the user needs to assign a new drive letter. So a computer-experienced user might assign drive letter by Diskpart, as this is the faster way. The purpose of this article is to provide you with some methods for assigning a drive letter , including Diskpart, Disk Management, and another easier way.

Step-by-step: Assign drive letter by Windows built-in tools

Windows OS users know they have two amazing tools for managing disks and partitions - Disk Management and Diskpart.

The Disk Management tool in Windows provides you with an easy-to-use graphical interface to manage your disks with a single mouse click. And Diskpart is a command-line tool that allows you to quickly manage your disks or partitions from the command prompt. The next section will show you how to use Disk Management and Diskpart to assign drive letters.

Diskpart is a Windows built-in tool that you can use to manage your hard drive, like format disk partition, create partition, delete partition , etc. Well, how to use Command Prompt Diskpart assign drive letter? The following parts may help you a lot.

Step 1. Press "Windows + R". Then, type "diskpart" and press Enter.

Step 2. Type in "list volume" and press Enter. Now, you can see all volumes on PC.

Step 3. Type in "select volume 7" and press Enter(here take volume 7 as an example).

Step 4. Finally, type in“assign letter=F” and press Enter.

If you want to remove the drive letter, type “remove letter=X”(X is the drive letter you want to remove).

Actually, you may assign a drive letter when you create a new one. For that, you need to create partition first. After creating a partition, type “assign letter=?” to that partition. Or, if there is some volume hidden, it will not have the drive letter, to unhide it, you need to assign a drive letter for it. 

In addition to Diskpart, Disk Management may be another good choice to assign drive letter.

Step 1. Press “Win + R” to open the “Run” window and type diskmgmt.msc in the box.

Step 2. Right-click the drive you want to assign, and select change Drive Letter and Paths in the pop-up window.

change drive letter and path

Step 3. Click Change to summon the next window.

change

Notice: If you want to remove the drive letter of your partition, you can select "Remove" and follow the instructions step by step.

Step 4. After that, you should choose the new drive letter from the drop list, and then, click OK.

assign new letter

Now, do you understand how to use Disk Management and Diskpart assign drive letter?

Although it's convenient for most people, you need to be aware that sometimes you can't assign drive letter successfully, because Disk Management and Diskpart only support assigning drive letter with FAT or NTFS. When the drive's file system is another type, you can format it to NTFS or FAT, or use another method to assign a drive letter.

Diskpart assign drive letter alternative

Disk Management and Diskpart are not perfect because they have limitations. Fortunately, there is an easier way to make up for their shortcomings perfectly.

AOMEI Partition Assistant Standard is a completely free third-party partition manager. It supports users to assign drive letters through a more friendly interface, which can be done with just a few clicks, much simpler than Diskpart. Also, it can assign drive letter on any file system. More importantly, it has more complete functions and allows you to manage disks flexibly.

Step 1. Launch AOMEI Partition Assistant, it will show you all storage devices in the main interface. you can see the removable drive doesn't have a drive letter. If you want to assign a drive letter for the drive, here you need to right click it, select Advanced-> Change Drive Letter.

Assign Drive Letter

Step 2. Then, select a drive letter for the drive.

Choose New Drive Letter

Step 3. Click Apply to submit the task.

Apply Assign Drive Letter

Now, do you know how to use Diskpart assign drive letter? If you are a user who has a computer background, Diskpart may be the quickest method to assign the drive letter. However, if you are normal user, AOMEI Partition Assistant Standard is the correct choice.  After you upgrade to AOMEI Partition Assistant Professional , there are more advanced features you can try, such as allocating free space from one drive to C, and Move the installed app from one drive to another.

Last but not least, although the system drive letter can be changed, do not do it because that would make the system unable to boot.

Can I remove a drive letter assignment using Diskpart? Yes, you can remove a drive letter assignment by using the "remove" command. For example, "remove letter=E" will remove the E drive letter from the selected volume.

Are there any restrictions on the drive letters I can assign using Diskpart? Drive letters A and B are traditionally reserved for floppy disk drives. You can assign any available drive letter from C to Z to a partition or volume, provided it's not already in use.

Do I need to be careful when using Diskpart to avoid data loss? Yes, you should be cautious when using Diskpart, especially if you're deleting partitions or making significant changes to disk configurations. Make sure you select the correct volume and drive letter to avoid accidental data loss.

Can I assign drive letter on a hidden drive? Yes, you can. Be very cautious when assigning a drive letter to a hidden drive or volume, as it might contain system or recovery files.

Press the Windows key, type "cmd" or "Command Prompt," right-click it, and choose "Run as administrator". In the Command Prompt window, type "diskpart" and press Enter. This will open the Diskpart utility. To see a list of all volumes, including hidden ones, type list volume and press Enter. Use the "select volume" command to choose the hidden volume. Replace "X" with the volume number or letter. A ssign a drive letter to the selected hidden volume, use the "assign letter=Y" command. Once you've successfully assigned the drive letter, you can exit Diskpart.

Cherry

Related Articles

How to permanently assign drive letter with ease.

A permanent drive letter prevents us from being confused with multiple USB drives. Then, how to permanently assign drive letter with ease? This post offers three effective ways to make it.

Drive Letter Not Available-Why and How to Solve It?

Can’t assign drive letter in Disk Management because a certain drive letter is not available? Follow this article to solve it efficiently.

How to Change Partition Type ID Easily? (2 Ways Included)

Are you in need of changing partition type ID in Windows? Read this article thoroughly to get two efficient methods to modify partition type ID.

Free Download to Try AOMEI Partition Assistant Now

techcult logo

3 Ways to Change Drive Letter in Windows 10

3 Ways to Change Drive Letter in Windows 10:  When you re-install Windows or have started your PC for the first time, you will notice that all your drives or volumes are by default assigned drive letter by Windows 10, well in future you might want to change these letter and in this post we will cover how to do that. Even when you connect an external drive such as hard disk, or a simple USB, you will notice that Windows 10 will automatically assign a drive letter to these connected drives.

How to Change Drive Letter in Windows 10

The process of Windows is quite simple, it progresses through the alphabet from A to Z to assign the available drive letters to devices as connected. But there are some letters which are exceptions such as A & B are reserved for floppy drives, whereas the drive letter C can only be used for the drive which has Windows installed on it. Anyway, without wasting any time let’s see How to Change Drive Letter in Windows 10 with the help of the below-listed tutorial.

Table of Contents

Make sure to  create a restore point  just in case something goes wrong.

Method 1: How to Change Drive Letter in Windows 10 using Disk Management

1.Press Windows Key + R then type diskmgmt.msc and hit Enter to open Disk Management.

diskmgmt disk management

2.Now right-click on the drive for which you want to change the drive letter for and then select “ Change Drive letters and Paths ” from the context menu.

change drive letter and paths

3.On the next screen, select the currently assigned drive letter then click on the “ Change ” button.

Select the CD or DVD drive and click on Change

4.Make sure to select or check “ Assign the following drive letter ” then select any available drive letter you want to assign for your drive and click OK.

Now change the Drive letter to any other letter from the drop-down

5.Click Yes to confirm your actions.

6.Once finished, you can close Disk Management.

Method 2: How to Change Drive Letter in Command Prompt

1.Press Windows Key + X then select Command Prompt (Admin).

Command Prompt (Admin).

2.Type the following command into cmd and hit Enter after each one:

diskpart list volume (Note down the number of the volume for which you want to change the drive letter for) select volume # (Replace the # with the number which you noted above)

Type diskpart and list volume in cmd window

assign letter=new_drive_letter (Replace new_Drive_letter with actual drive letter which you want to use for example assign letter=G)

Type the following command to assign a drive letter assign letter=G

Note: If you selected an already assigned drive letter or the drive letter is not available then you will receive the error message indicating the same, again use a different drive letter to successfully assign a new drive letter for your drive.

3.Once finished, you can close the command prompt.

Method 3: How to Change Drive Letter in Windows 10 using Registry Editor

1.Press Windows Key + R then type regedit and hit Enter to open Registry Editor.

Run command regedit

2.Navigate to the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

Navigate to MountedDevices then right-click on the drive and select rename

3.Make sure to select MountedDevices then in right window pane right-click on the binary (REG_BINARY) value (ex: “\DosDevices\F:”) for the drive letter (ex: “F”) of the drive you want to change the drive letter for and select Rename.

4.Now rename only the drive letter part of the above Binary value with an available drive letter for example. “ \DosDevices\G: ” and hit Enter.

How to Change Drive Letter in Registry Editor

5.Close Registry Editor and reboot your PC.

Recommended:

  • How to Change Monitor Refresh Rate in Windows 10
  • How to Fix Scaling for Blurry Apps in Windows 10
  • Enable or Disable Domain Users Sign in to Windows 10 Using Biometrics
  • How to Change Drive Icon in Windows 10

That’s it you have successfully learned How to Change Drive Letter in Windows 10 but if you still have any questions regarding this tutorial then feel free to ask them in the comment’s section.

About The Author

Aditya Farrad

Aditya Farrad

Fix Uber Eats Checkout Not Loading and won't let me place order

How to Fix Uber Eats Checkout Not Loading and Won’t Let Me Place an Order

This Group Can't Be Displayed Error Telegram Why and How to Fix

This Group Channel Can’t Be Displayed Error Telegram: Why and How to Fix (2024)

onlyfans videos not loading

9 Ways to Fix OnlyFans Videos Not Loading

Fix “Call ends immediately after dialing” on Android

9 Easy Ways to Fix Call Ends Immediately after Dialing on Android

How to Fix No Subject Messages on Samsung

How to Fix No Subject Messages on Samsung

How to Password Protect or Encrypt ZIP File on Windows 10 or 11

How to Password Protect or Encrypt ZIP File on Windows 10/11

Leave a comment cancel reply.

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

Sign up for our daily newsletter

  • Privacy Policy
  • Advertise with Us

How to Remove and Assign Drive Letters in Windows with Diskpart

Vamsi Krishna

Diskpart is one of the most powerful Windows command line utilities which first appeared in Windows XP. Diskpart is mainly used by Windows administrators to manage tasks like partition management, formatting, creating, re-sizing and getting a detailed information regarding the hard disk or other removable disks attached to the computer. Even though you have a built-in GUI application called Disk Management utility in Windows, Diskpart is much more flexible and works well in a server environment where you need to set up some advanced features like RAID.

Note: This post isn’t intended for beginners, and doing something wrong while using Diskpart utility may cause drive failures and data losses, so make sure that you have a good backup before continuing. You have been warned.

Assign Drive Letter Using 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).”

diskpart-launch-cmd-as-admin

The above action will open the command prompt window with administrative rights. Here enter the following command to start the Diskpart utility.

diskpart-cmd-diskpart

The next step is to list all the volumes in your computer so that you can clearly see all the volume numbers and drive letters of your hard disk partitions and any other removable devices. Use the command below to list all the volumes.

diskpart-list-volume

Once the Diskpart utility lists all the volumes, take a note of the volume number of the drive you want to assign a new drive letter. In my case, I’m trying to assign a new drive letter to the drive I:\ , so my volume number is 7 . Now execute the following command to select the volume while replacing the # symbol with an actual volume number.

diskpart-select-volume

Once the volume is selected, use the following command to assign a new drive letter. Don’t forget to replace the letter “V” with the drive letter you want to assign.

diskpart-assign-letter

That’s all there is to do; you have successfully changed or re-assigned a new drive letter to a partition or a removable drive in Windows. In fact, if you open the Windows explorer, you can see that the change is reflected immediately.

diskpart-drive-letter-changed

Remove Drive Letter using Diskpart

Before moving any further, removing or un-assigning drive letter will effectively hide the drive or partition from plain sight, i.e. you cannot see that drive in the Windows explorer. To remove a drive letter, follow the above steps 1 through 4 and then use the below command to remove the drive letter of a drive or partition. Don’t forget to replace the letter “I” with the actual drive letter.

diskpart-remove-letter

As soon as you have done that, Diskpart will remove the drive letter for that volume. If you list the volumes again, you will see that the drive you just interacted with will have no drive letter next to it.

diskpart-letter-removed

Moreover, if you navigate to the Windows explorer, you will see that the drive which got un-assigned isn’t listed anymore. But again, always be careful while you are messing around with Diskpart utility; it may cause irrecoverable data loss if used incorrectly.

Hopefully that helps, and do comment below if you face any problems while following the steps or to simply share your thoughts.

Our latest tutorials delivered straight to your inbox

Vamsi Krishna

Vamsi is a tech and WordPress geek who enjoys writing how-to guides and messing with his computer and software in general. When not writing for MTE, he writes for he shares tips, tricks, and lifehacks on his own blog Stugon.

Ms Paint Not Working Windows Featured Image

MiniTool

  • Disk & Data Manager
  • Partition Wizard
  • Power Data Recovery
  • ShadowMaker
  • Media Toolkit
  • uTube Downloader
  • Video Converter
  • Download Partition Wizard Free Edition: Download Pro Edition: Try Demo Server Edition: Try Demo

Diskpart Unassign Drive Letter in Windows 11/10 [Full Guide]

Diskpart is a well-known Windows built-in disk partition utility used to format /create/delete partitions,  online/offline disk , wipe disks, etc. However, a lot of users are unclear about how to use this utility. For example, here a user posted a question about how to change drive letter diskpart on the answers.microsoft.com forum:

Is there a way to unassign drive letter diskpart? Windows will not assign a drive letter automatically when I inserted a Windows installation media. https://answers.microsoft.com/en-us/windows/forum/all/manually-assigning-a-drive-letter-using/bbb3baf6-cda4-4d06-b431-eae9e975a5c7

How to Unassign Drive Letter Diskpart in Windows 11/10

A drive letter is a single alphabetic character from A to Z assigned by Windows to a drive or partition connected to the computer. Sometimes, you may need to change drive letter diskpart in some situations. How to let diskpart unassign letter in Windows 11/10? Here are detailed steps:

If you remove the drive letter from a partition, it will no longer show as a drive in  File Explorer  and the unassigned drive letter can be available to other partitions.

Step 1.  Press  Win + R  keys to open the  Run  dialog box, and then type  diskpart  in it and press  Enter . Then click on  Yes  to open the tool in Command Prompt.

type diskpart in the Run box

Step 2. To let diskpart unassign drive letter, type the following commands in order and press Enter after each one.

  • list volume
  • select volume * (replace * with the partition number you want to remove its drive letter from)
  • remove letter=K (replace K with the drive letter that you want to remove)

remove drive letter

The process of diskpart assign letter is very simple and similar to removing a drive letter. To assign drive letter diskpart, you can open the Command Prompt window again as we explained above, type the following commands in order and press Enter after each one.

  • select volume 10
  • assign letter=k

diskpart assign drive letter

Although Diskpart is a practical partition manager in Windows, sometimes this utility can run into various errors such as “ DiskPart failed to clear disk attributes ”, “ Diskpart virtual disk service error ”, “failed to assign a drive letter”, etc. Is there an alternative to diskpart unassign drive letter? Of course, yes! Let’s keep reading.

Best Alternative to Diskpart Remove Drive Letter

If you can’t change drive letter CMD or Diskpart, MiniTool Partition Wizard is the best alternative. It is a trustworthy and comprehensive partition manager that allows you to change drive letters easily. Besides, this partition software can be used to extend/resize/hide/copy/format partitions, migrate OS , convert FTA to NTFS without data loss , change cluster size, recover lost data , and more.

MiniTool Partition Wizard Free Click to Download 100% Clean & Safe

Step 1. Launch the program to enter its main interface, right-click the partition, and select Change Letter from the pop-up menu.

diskpart assign drive letter

Step 2. If you want to remove the drive letter, select None from the New Drive Letter drop-down menu and click on OK to save the change. Alternatively, you can select a new drive letter from the drop-down menu to assign a drive letter for the partition.

Step 3. Click on Apply to execute the change.

unassign drive letter using MiniTool

If you just want to hide the partition in File Explorer rather than remove the drive letter, you can select the partition and click Hide Partition > Apply from the left action panel.

select Hide Partition using MiniTool

How to make diskpart remove drive letter in Windows 11/10? All detailed steps have been illustrated. Now, you can change drive letter using diskpart/CMD. If it doesn’t work, you can use a better alternative – MiniTool Partition Wizard.

About The Author

Ariel

Position: Columnist

User Comments :

assign drive letter windows 10 cmd

Top Contributors in Windows 10: Ramesh Srinivasan  -  neilpzz  -  Horace Wiggins  -  franco d'esaro  -  _AW_   ✅

February 14, 2024

Top Contributors in Windows 10:

Ramesh Srinivasan  -  neilpzz  -  Horace Wiggins  -  franco d'esaro  -  _AW_   ✅

  • Search the community and support articles
  • Search Community member

Ask a new question

In Windows 10 how do I revert drive letter allocation for a specific USB drive so that it receives the next available letter?

When I plugged in a specific USB memory stick to a particular PC (Windows 10) it was being allocated a specific drive letter "O" which I probably assigned manually sometime in the past. I've now decided I don't want this drive to be given this letter any more. So I thought this would be easy - just remove the drive letter via Disk Management and "Change Drive Letter and Paths" and Windows will then revert to the standard behavior of allocating the next available letter. Unfortunately this doesn't happen! Windows now refuses to allocate a drive letter automatically meaning that the drive cannot be accessed through File Explorer although it does appear in Disk Management (but without a drive letter). If this same drive is connected to another PC the random drive letter allocation works as expected.

I can fix this by re-allocating a fixed drive letter again to the drive via Disk Management. But does anybody know how to tell Windows to resume back to the normal drive allocation behavior short of trying to invoke a system restore or reinstalling Windows? Shaun.

  • Subscribe to RSS feed

Report abuse

Replies (14) .

* Please try a lower page number.

* Please enter only numbers.

  • Microsoft Agent |

Welcome to Microsoft Community.

I'm Hahn and I'm here to help you with your concern.

I’m sorry to hear that you are having trouble with your USB drive letter. You can try the following steps to remove a fixed drive letter and let Windows assign it automatically:

If "Change Drive Letter and Paths in the context menu" does not work, you may need to use command prompt or PowerShell commands to remove the drive letter.

To use command prompt or PowerShell commands to remove a drive letter, you need to open an elevated command prompt or PowerShell window. Then you can use one of the following methods:

Using Diskpart:

Type diskpart and press Enter.

Then type list volume and press Enter.

Make note of the volume number for the drive letter you want to remove.

Then type select volume <volume number> and press Enter.

Finally, type remove letter=<drive letter> and press Enter.

Using PowerShell:

Type Get-Volume -DriveLetter <drive letter> | Get-Partition | Remove-PartitionAccessPath -AccessPath "<drive letter>:\" and press Enter.

Please be careful when using these commands as they can affect your system if used incorrectly. You may want to back up your data before proceeding.

I hope this helps. If there is anything not clear, please do not hesitate to let me know.

Your Sincerely

Hahn - MSFT | Microsoft Community Support Specialist

4 people found this reply helpful

Was this reply helpful? Yes No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

Thanks for your feedback.

Hello Hahn,

Thank you for your suggestion about using DISKPART instead of

" Change Drive Letter and Paths " via " Disk Management ".

I followed your notes and then unplugged the drive, re-plugged it and

restarted Windows and still the drive does not appear within File Explorer. I then re-assigned a drive letter “S:” to it and tried the PowerShell route: Remove-PartitionAccessPath -disknumber 1 -partitionnumber 1 -accesspath S:

The drive vanished from File Explorer as I would expect. On disconnecting and re-connecting it, Windows will still not assign a letter to it.

So unfortunately I'm experiencing the exact same behavior as I originally described. Once the drive letter

has been “Removed” (in whatever way), Windows thereafter steadfastly refuses to assign a drive letter automatically. If I connect the same drive to another PC, a drive letter

is allocated as normal.

Therefore there seems to be a low level association between the particular USB drive and

the PC on which the drive letter was removed which Windows remembers and then decides

to never again assign a letter automatically to that specific drive. I haven’t tried reformatting the drive but even if that fixes the problem it would seem a drastic

way to get around it.

1 person found this reply helpful

Ramesh Srinivasan

  • Volunteer Moderator

Unplug the USB disk (physically).

Open a Command Prompt (admin) window.

mountvol /R

Plug the USB stick now.

Let's know if that works.

5 people found this reply helpful

I did as you suggested:

then connected the drive.

Initially the drive wasn't being detected (except in Device Manager under USB Controllers and "USB Mass Storage Device") so I re-started Windows. It still wasn't being detected (not even in Disk Management) until I unplugged it and re-connected a couple of time when a File Explorer window suddenly popped up showing the drive's contents and the next available drive letter E: assigned nicely. So mountvol /r seems to be the solution for which I thank you. Even then, Windows does seem

to take some prodding before it will eventually mount the device and assign a drive letter.

But I can live with that as it's rare that I would want to remove a drive letter anyway. I'll do a little more testing tomorrow and post again with the results. Regards,

Let's know how it goes.

I'll see if I can test Mountvol /R with a USB mass-storage device instead of a USB flash drive.

I'm glad that the mountvol /r command worked for you in resolving the issue of the drive not being automatically assigned a drive letter by Windows. It's possible that the previous drive letter assignment had caused some kind of conflict with the current system configuration, leading to the issue you experienced.

As you mentioned, Windows can sometimes take a little time to detect and assign a drive letter to a newly connected device. This can be due to various reasons such as driver installation, disk initialization, or other background processes that may be running on the system. In general, it's always a good idea to wait for a few seconds after connecting a new device to allow Windows to detect and configure it properly.

If you encounter any further issues or have any more questions, feel free to ask.

Thank you for your valuable input. I tried a fresh test this morning with a different USB memory stick (FAT32 although I don't imagine the file system is relevant), removing the drive letter (which I see now is in effect removing the mount point), disconnecting the drive, running mountvol /r and then after waiting for a minute or so, reconnecting it. But today it was not auto-mounted even after a Windows restart. Yesterday, it did auto-mount but not until several disconnections and re-connections.

It seems to be temperamental. Assigning a drive letter (or using "mountvol E: \\?\Volume{9ae43941-c41e-11ed-87b6-b8ac6fd8cf14}\" assuming the device ID is known) does work immediately but then we're back to where we were with a fixed drive letter which is what I was originally trying to undo. But as I've been writing I've just tried the whole thing again after mounting it to a specific drive letter, removing it, running mountvol /r, waiting a few seconds, re-connecting and now it works almost immediately with File Explorer popping up nicely.

I can't see a pattern here but at least I now know what to try in the future.

It's good to hear that you were able to get it to work eventually. It does sound like the behavior of the USB device is a bit temperamental, and it's difficult to identify a pattern in the way it behaves. It could be due to a number of factors such as hardware issues, driver issues, or even the operating system's handling of the device.

In any case, it's good to know that assigning a drive letter works for you if you need to access the device quickly. You may want to consider keeping a backup of your important files on another device or cloud storage to avoid any data loss in case the USB device fails completely.

I agree with everything you say and am well aware there are many factors at play. I've been working with Windows for more years than I care to remember and there always seems to be something new to learn.

Still, I'm a little surprised that Microsoft don't have a more fool-proof way to address this issue in the GUI with, say, a tick box within the "Change Drive Letter and Paths" window called "Automatically assign a Drive Letter". You and I may be comfortable with exploring options from the command line but I suspect most end users would find it difficult although I suppose they probably wouldn't have reason to remove a drive letter in the first place. You are certainly correct that backing up the memory stick is advisable as, although I didn't mention it, more than once while I was experimenting, Windows told me the "USB device not recognized" which was disconcerting to say the least although it was eventually recognized and the contents were intact. Another reason for some surprise that this whole area of drive letters and mounting is not more robust and easier to manage given the maturity of the OS at least as far as Windows 10.

I understand your concerns and frustrations regarding the management of drive letters in Windows. While it is true that Microsoft could potentially make the process more user-friendly, there are many technical complexities involved in managing hardware devices and assigning drive letters.

That being said, Microsoft has made efforts to simplify the process in Windows 10. For example, the Disk Management tool includes a feature that allows users to easily change the drive letter of a device by right-clicking on the device and selecting "Change Drive Letter and Paths". This feature also allows users to assign a new drive letter to a device, which can be especially useful when a device is not automatically assigned a letter.

It is also worth noting that the issue you encountered with the USB device not being recognized may not necessarily be related to the management of drive letters. There are many factors that can cause a device to not be recognized, such as hardware malfunctions or driver issues. Therefore, it is always a good idea to back up important data on a regular basis to prevent data loss.

Overall, while the management of drive letters in Windows can be complex, there are tools and resources available to help users manage their devices effectively. It is always a good idea to research and familiarize oneself with the process before making any changes to device configurations.

Question Info

  • Files, folders, and storage
  • Norsk Bokmål
  • Ελληνικά
  • Русский
  • עברית
  • العربية
  • ไทย
  • 한국어
  • 中文(简体)
  • 中文(繁體)
  • 日本語

IMAGES

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

    assign drive letter windows 10 cmd

  2. How to Change Drive Letter with CMD Windows 10

    assign drive letter windows 10 cmd

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

    assign drive letter windows 10 cmd

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

    assign drive letter windows 10 cmd

  5. Change and Assign Drive Letter in Windows 10

    assign drive letter windows 10 cmd

  6. Change and Assign Drive Letter in Windows 10

    assign drive letter windows 10 cmd

COMMENTS

  1. Manually assigning a drive letter using CMD/Diskpart

    Procedure 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 assign permanent letters to drives on Windows 10

    To assign a drive letter using Command Prompt, use these steps: Open Start. Search for Command Prompt, right-click the result, and then select the Run as administrator option. Type the...

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

    You'll need to start by opening an administrator mode command prompt -- type cmd into the search box, and then right-click and choose Run as administrator, or use the CTRL + SHIFT + ENTER keyboard shortcut. Once there, run the diskpart command, and then type in the following to list out the volumes on your system. list volume

  4. Change and Assign Drive Letter in Windows 10

    1 Press the Win + R keys to open Run, type diskmgmt.msc into Run, and click/tap on OK to open Disk Management. 2 Right click or press and hold on the drive (ex: "F") you want to add or change the drive letter, and click/tap on Change Drive Letter and Paths. (see screenshot below) 3 Click/tap on the Change button. (see screenshot below)

  5. How to Change Drive Letter with CMD Windows 10

    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

  6. Assign Drive Letters to Folders in Windows

    Method 1: Use the subst DOS Command Method 2: Use the psubst Utility Method 3: Use a Graphical Tool For this example, we will assign a drive letter for the following folder: C:\Users\Lori Kaufman\Documents\My Work. Open the Start menu and enter " cmd.exe " (without the quotes) in the Search programs and files box.

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

    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." You could also hit Windows+X or right-click the Start button, and then click "Disk Management."

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

    1 How to Change Drive Letter in Windows 10 via Disk Management 2 How to Change Drive Letter in CMD using a DISKPART Disk Management Command 3 How to Change Drive Letter in Windows...

  9. How to Change Drive Letter in Windows 10

    Press the Win + X keys together. In the menu, select Disk Management. In Disk Management, right-click on the partition whose drive letter you would like to change. Select Change Drive Letter and Paths in the context menu. In the next dialog, click on the Change... button.

  10. How to assign a drive letter in Windows 10

    Right-click on the Start button. Click Disk Management to open the Disk Management console. Right-click the volume that has the drive letter you want to change. Click Change Drive Letter And Paths ...

  11. How to Change Drive Letter in Windows?

    Press Win+X and click Disk Management. Alternatively, press Win+R and run the diskmgmt.msc command. Find the drive or partition for which you want to change the letter. In this example, we'll choose the drive E. Right click the volume from the list and click Change Driver Letter and Paths. In the next window, select the drive letter and click ...

  12. 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. You can ...

  13. How to Change Drive Letter Windows 10

    On the Change Drive Letter and Paths pop-up, click Change. Then, on the Change Drive Letter or Path pop-up, click the Assign the following drive letter drop-down and select a new drive letter. Finally, to change drive letter on Windows 10 with Disk Management, after selecting a new drive letter, click OK. Then, on the confirmation pop-up, note ...

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

    EaseUS Partition Master 18.8K reviews 3 Simple Ways to Assign a Drive Letter in Windows 10/8/7 How to assign a drive letter in Windows 10/8/7? This post covers three ways to assign a drive letter by using Disk Management, a partition manager, and Diskpart in CMD. Free Download Windows 11/10/8/7 100% Secure

  15. [Free Guide]: Use Diskpart Assign Drive Letter in Windows 11, 10, 8, 7

    Step 1. Press "Windows + R". Then, type "diskpart" and press Enter. Step 2. Type in "list volume" and press Enter. Now, you can see all volumes on PC. Step 3. Type in "select volume 7" and press Enter (here take volume 7 as an example). Step 4. Finally, type in"assign letter=F" and press Enter.

  16. 3 Ways to Change Drive Letter in Windows 10

    1.Press Windows Key + R then type diskmgmt.msc and hit Enter to open Disk Management. 2.Now right-click on the drive for which you want to change the drive letter for and then select " Change Drive letters and Paths " from the context menu. 3.On the next screen, select the currently assigned drive letter then click on the " Change " button.

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

    select volume # Once the volume is selected, use the following command to assign a new drive letter. Don't forget to replace the letter "V" with the drive letter you want to assign. assign letter =V That's all there is to do; you have successfully changed or re-assigned a new drive letter to a partition or a removable drive in Windows.

  18. Diskpart

    More on the blog: https://bit.ly/31NoF4GAssign drive letters in the command line with Diskpart.Start a command prompt and type "diskpart". Then you can use "...

  19. How To Manually Assign Or Change A Drive Letter Using Command Prompt

    How to change drive letter using cmd/Diskpart on Windows 10/11Type "diskpart"Type "list vol"Select the volume using "sel vol number"Assign the drive letter u...

  20. Diskpart Unassign Drive Letter in Windows 11/10 [Full Guide]

    Step 1. Press Win + R keys to open the Run dialog box, and then type diskpart in it and press Enter. Then click on Yes to open the tool in Command Prompt. Step 2. To let diskpart unassign drive letter, type the following commands in order and press Enter after each one. list volume.

  21. In Windows 10 how do I revert drive letter allocation for a specific

    You can try the following steps to remove a fixed drive letter and let Windows assign it automatically: If "Change Drive Letter and Paths in the context menu" does not work, you may need to use command prompt or PowerShell commands to remove the drive letter. To use command prompt or PowerShell commands to remove a drive letter, you need to ...