how to assign drive letter command

Contribute to the Windows forum! Click  HERE  to learn more  💡

March 14, 2024

Contribute to the Windows forum!

Click  HERE  to learn more  💡

Top Contributors in Windows 11: neilpzz  -  Kapil Arya MVP  -  questions_  -  Reza Ameri  -  RAJU.MSC.MATHEMATICS   ✅

March 11, 2024

Top Contributors in Windows 11:

neilpzz  -  Kapil Arya MVP  -  questions_  -  Reza Ameri  -  RAJU.MSC.MATHEMATICS   ✅

  • Search the community and support articles
  • Search Community member

Ask a new question

LightJack05

  • Article Author

Manually assigning a drive letter using CMD/Diskpart

[Localization from this article: Manuelles Zuweisen eines Laufwerksbuchstaben mit CMD bzw. Diskpart - Microsoft Community ]

Technical Difficulty: Expert

Applies to: Windows 10 & 11

In some cases, Windows will not assign a drive letter automatically to an inserted drive. For example, this can happen when using a Windows installation media.

In that case, you can use diskpart to manually assign a drive letter.

NOTE: If your drive doesn't get assigned a drive letter, even though you are in a normal Windows environment, this can indicate a problem with the drive. Please back up your files in that case.

Open up a command prompt (CMD/PowerShell).

Type "diskpart" to start up diskpart. You will see the prompt change to "DISKPART>".

how to assign drive letter command

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.

how to assign drive letter command

Select the volume using "sel vol <number>".

how to assign drive letter command

Assign the drive letter using "assign letter=<letter>".

how to assign drive letter command

You can now exit diskpart by typing "exit" and switch to the drive using "<letter>:".

how to assign drive letter command

It should also be available from Windows Explorer now.

55 people found this helpful

  • Subscribe to RSS feed

Was this article helpful? Yes No

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this article?

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

Thanks for your feedback.

Comments (17) 

* Please try a lower page number.

* Please enter only numbers.

Joe13 B-) 2.0

Thanks for the tutorial, I don't think I need to use Google for it anymore!

Congrats on Article Author too! :)

Report abuse

6 people found this comment helpful

Was this comment helpful? Yes No

How satisfied are you with this comment?

Thanks for the tutorial, I don't think I need to use Google for it anymore! Congrats on Article Author too! :)

5 people found this comment helpful

Thanks! Happy I could help! :)

1 person found this comment helpful

RAJU.MSC.MATHEMATICS

Very helpful Thanks.

3 people found this comment helpful

Thank for this informative article.

I ran this in PowerShell PS C:\WINDOWS\system32> GWMI -namespace root\cimv2 -class win32_volume | FL -property DriveLetter, DeviceID

The results are below. I need to know more about the DriveLetter, that does not have a letter and I cannot give it a letter, as you can see in DiskPart.

I'm sure someone personally hacking my computer. I'm wondering if this them hiding on it, and that is why I someone is typing over me and has more control at times of my computer then I do. Maybe a hidden AD Hoc.

I have searched for this on Google I'm either getting blocked or there is no information out there on this.

PS C:\WINDOWS\system32> GWMI -namespace root\cimv2 -class win32_volume | FL -property DriveLetter, DeviceID

DriveLetter : B:

DeviceID : \\?\Volume{26xxxxxx--xxxx-xxxx-xxxxxxxxxxxxxx}\

DriveLetter : C:

DriveLetter :

DeviceID : \\?\Volume{d5xxxxxx--xxxx-xxxx-xxxxxxxxxxxxxx}\

DriveLetter : D:

PS C:\WINDOWS\system32> DiskPart

Microsoft DiskPart version 10.0.19041.1

Copyright (C) Microsoft Corporation.

On computer: My Computer

DISKPART> List Volume

Volume ### Ltr Label Fs Type Size Status Info

---------- --- --- -------- ----- ---------- ------- --------- --------

Volume 0 D RAW DVD-ROM 2048 B Healthy

Volume 1 B System Rese NTFS Partition 100 MB Healthy System

Volume 2 C NTFS Partition 698 GB Healthy Boot

2 people found this comment helpful

I followed the instructions to CHANGE the letters assigned for three external hard drives. (The computer had named them E, F, G but gave the names to the wrong external hard drive) I changed the letters to the correct names singly (I disconnected the two not being adjusted) Now, I have 2 E, 2 F, 2 G names in the list (when accessed through File Explorer. When I click on "This PC", it shows just the one of each. If I click on either, or both of the same letter name, the same exact files will open. This is annoying. Anyone have a clue what can be done? This is on a brand new computer running Windows 11.

Sorry about the late reply.

That sounds weird... Usually, windows doesn't allow you to assign a drive letter twice.

If you want to change the letters, you usually have to remove them first and then reassign them.

Can you send me a screenshot of disk management, and of the list of volumes?

the partition that is not shown in diskpart is most likely some sort of recovery or reserved partition.

This is not the typical way of hiding an infection with malware...

Also, do note that your ESP (Volume B) should not be mounted, since modifying it can corrupt your Bootloader.

As for the suspected hacking, what symptoms did you observe? Mouse moving on its own, high resource usage, unexpected firewall prompts? Other things?

If you have a compromised system, its almost impossible to clean it from infections without doing a clean install of windows. I would suggest you do that if you suspect an infection. It will take time though and will delete everything on your PC. (Including files, programs, settings.) Create a backup before you reinstall.

There are no viruses nor malware on this computer. I believe it is a reflection of the original name choice. The information contained on each external hard drive is identical, yet when I go into MY PC, it only shows one set of externals. I am afraid to delete one of the duplicates because it might be just mirrored and it will make everything go away. I have way too many things on these external hard drives to lose any of them.

Thanks for your input. Jan

Forum Article Info

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

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.

how to assign drive letter command

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.

how to assign drive letter command

  • Click the Change button.

how to assign drive letter command

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

how to assign drive letter command

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

how to assign drive letter command

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.

how to assign drive letter command

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

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 How to create custom screensaver from your favorite images on Windows 11
  • 3 Dragon's Dogma 2's first big update patch is here and adds a "New Game" option, but it's late on Xbox
  • 4 Dragon's Dogma 2 'Hunt for the Jadeite Orb' quest guide: Location, who to give it to, and all outcomes
  • 5 Microsoft says ChatGPT isn't better than Copilot AI; you're just not using it as intended

how to assign drive letter command

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.

Best Windows Pdf Convertors Featured

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

TechRepublic

Account information.

how to assign drive letter command

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.

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

WindowsLoop

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.

Windows automatically assigns a unique drive letter for all the drives, partitions, and plugged-in USB drives. Generally, the assigned letters are in incremental order starting with the letter C. For the most part, you don’t have to change the drive letter as it is pretty inconsequential in most cases. However, there might be times when you need to manually modify the drive letter of a drive, partition, or plugged-in USB drive to meet certain requirements.

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.

Table of contents:

Change drive letter using partition manager

Commands to change drive letter.

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).

The steps below work the same in Windows 10 and 11.

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.

Here is how to do it:

  • Press “ Win + R ” to open Run .
  • Type “ diskmgmt.msc ” and click “ Ok .”
  • Find the drive you want to modify.
  • Right-click on the drive.
  • Choose the “ Change drive letter and paths ” option.
  • Click the “ Change ” button.
  • Select the “ Assign the following drive letter ” radio option.
  • Choose a drive letter from the dropdown.
  • Click “ Ok .”
  • Click “ Yes ” in the warning window.
  • Again, click “ Yes ” in the second warning window.
  • Close the main disk management window.
  • You have successfully changed the drive letter in Windows 10 and 11.

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-option-190820

Now, click the “Change” button.

Click-change-button-190820

Select the “Assign the following drive letter” radio option, choose a drive letter from the dropdown menu, and press “Ok.”

Select-new-drive-letter-190820

You will see a couple of warning prompts. Press the “Yes” button in both prompts.

Accept-changes-190820

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.

Drive-letter-changed-190820

You can use the diskpart command to change the drive letter of any drive, partition, or USB drive in Windows. Here’s how to use the command to modify the 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.

Diskpart-command-190820

Type “ list volume ” and press Enter.

The above command will list all partitions and their volume numbers. Take note of the volume number of the drive you want to modify.

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

Diskpart-list-volume-select-volume-190820

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

Diskpart-change-drive-letter-190820

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.

If you are stuck or need some help, send an email, and I will try to help as much as possible.

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

Leave a Comment Cancel Reply

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

Save my name, email, and website in this browser for the next time I comment.

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.

Make sure to read my other tips on how to hide drive in Windows and how to map a folder to a drive letter in Windows. If you have any questions, feel free to comment. 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:

how to assign drive letter command

Leave a Reply

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

How-To Geek

Map a drive letter to a folder the easy way in windows.

Have you ever needed to repeatedly access a folder that is nested deep inside a giant hierarchy of folders? Sure, you can always create a shortcut to

Have you ever needed to repeatedly access a folder that is nested deep inside a giant hierarchy of folders? Sure, you can always create a shortcut to that folder, but did you know you can actually assign a drive letter to a folder instead? Today we'll show you how to do this. This ability has existed in Windows via the subst command for quite a while, so this will also work for you XP users as well. Map a Drive Letter the Easy Way The easiest way to assign a drive letter to a folder is to use a simple utility called Visual Subst, which gives you a nice graphical interface to assign drive letters, but also does something that the command line version can't... you can set your virtual drives to apply again at startup. You can download and run the utility without needing to install it, and then simply use the Browse button to select your path, and click the green plus symbol after choosing the drive letter. At this point you should see the drive letter show up in the list. (Note that you can delete it by highlighting and choosing the red X icon, or change the path / letter by using the Save button.

If you want to save the drives, you'll want to select the "Apply virtual drives on Windows startup" option. Now when you open up your Computer window, you should see the new drive show up in the list.

The contents of the new M: drive will actually be the contents of my desktop folder. Download Visual Subst from ntwind.com Assign Drive Letters from the Command Prompt If you are more the keyboard ninja type, or just want to know how to use the command line version, you can use the subst command to map drive letters the same way by using the following syntax:

subst <driveletter> <folder path>

For example, to map the M: drive to my desktop folder I would use the following command:

subst M: c:\users\geek\desktop

If you just want to see which drive letters are assigned, you can use subst without any arguments, as shown here:

To delete a drive letter you can use the /D switch instead of a path... for instance, to delete the M: drive that I just created, I would use the following syntax:

subst M: /D

Now when you use the subst command to see the current drives, you'll see nothing in the list.

I've found the subst command to be very useful, not just in shortening folder paths but also in one instance where I wanted to delete my second partition... I just reassigned the D: drive letter to point to C: and copied all the data over. That way the application shortcuts still worked without having to reinstall the application.

IMAGES

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

    how to assign drive letter command

  2. How to Assign and Remove Drive Letter with Diskpart in Windows 10 or 11?

    how to assign drive letter command

  3. [Solved] How to Change Drive Letter on Windows 11

    how to assign drive letter command

  4. How to Change/Rename/Assign Drive Letter in CMD Windows 10/7

    how to assign drive letter command

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

    how to assign drive letter command

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

    how to assign drive letter command

VIDEO

  1. How to Change Drive Letter in Windows 11/10

  2. 🧐 what the picture The picture 143 letter command me#subscribe and like 👍👍#

  3. How To Change Computer drive letter in Command Prompt ( With CMD ) in Hindi

  4. How to Change Drive Letter in Windows 10

  5. Add a partition to Hard Disk (Add Local Disk) in Windows

  6. How to Manually Assigning A Drive Letter Using Command

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

    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 ...

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

    The diskpart utility makes it easy. 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 ...

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

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

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

    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 ...

  6. 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.

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

    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". Step 3. Pick "Change" to alter the drive letter. Or pick "Add" to add a drive letter for drives without one. Step 4.

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

    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. Step 3.

  9. How to Change Drive Letter with CMD Windows 10

    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 ...

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

    Assign a drive letter via PowerShell command. Remembering the letter you noted down earlier, type: Get-Partition -DriveLetter x | Set-Partition -NewDriveLetter y Replace x with the drive letter ...

  11. 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 "...

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

  13. 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 ...

  14. How to Manually Assigning A Drive Letter Using Command

    This Tutorial Helps to How to Manually Assigning A Drive Letter Using Command00:00 Intro00:10 Open Command Prompt00:20 Diskpart00:27 List Volume00:40 Select ...

  15. How to Change Drive Letter in Windows 10

    Let's review them. To change the drive letter in Windows 10, do the following. 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.

  16. How to Manually Assigning A Drive Letter Using CMD / Diskpart

    This Tutorial Helps to How to Manually Assigning A Drive Letter Using CMD / Diskpart00:00 Intro00:09 Open Command Prompt00:20 Enter Diskpart Command00:50 Ass...

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

    Press " Win + R " to open Run. Type " diskmgmt.msc " and click " Ok .". Find the drive you want to modify. Right-click on the drive. Choose the " Change drive letter and paths " option. Click the " Change " button. Select the " Assign the following drive letter " radio option. Choose a drive letter from the dropdown.

  18. How to Change a Drive Letter in Windows

    To assign or change the drive letter for a disk or partition, simply right-click on it and choose Change Drive Letter and Paths. 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. Next, you will choose the new drive letter from the dropdown list.

  19. Map a Drive Letter to a Folder the Easy Way in Windows

    The contents of the new M: drive will actually be the contents of my desktop folder. Download Visual Subst from ntwind.com Assign Drive Letters from the Command Prompt If you are more the keyboard ninja type, or just want to know how to use the command line version, you can use the subst command to map drive letters the same way by using the following syntax:

  20. How to Assign or Change Drive Letter in Windows 11?

    Go to "Action > All Tasks > Change Drive Letter and Paths…" menu. Change Drive Letter in Disk Management. On the pop-up that appears, click on "Change…" button. Select Change Button. Click on the dropdown against "Assign the following drive letter:" option. Select your favorite letter and click "OK" button.

  21. Assign drive letter to recovery partition windows 10

    To assign a drive letter to your lost partition, follow these steps: Step 1. Right-click on the Start button, then choose "Disk Management". Step 2. Right-click the partition you want to ...