To assign a drive letter in Windows 11 or 10, open Disk Management (press Win + X and choose Disk Management), right-click the partition, choose Change Drive Letter and Paths, click Add (or Change if it already has a letter), pick a letter and click OK. The drive appears in File Explorer straight away, and your files are not touched. You can do the same thing from the command line with diskpart or PowerShell, which is handy when Disk Management will not cooperate.
This guide covers all three methods, what to do when the option is grayed out, and how to keep a USB drive on the same letter every time.
When you need to assign a letter
- A drive shows in Disk Management but not in File Explorer. Without a letter (or a folder mount point), Explorer has nothing to show.
- A USB drive gets a different letter each time, breaking backup jobs or shortcuts.
- Two drives fight over the same letter, for example a USB stick and a mapped network drive.
- You want a tidy layout, such as D: for data and G: for games.
If the drive shows as Not Initialized, Unallocated, Offline or RAW, a letter will not help yet. See Disk Management status meanings to find the right fix for each status.
Method 1: Disk Management
- Press Win + X and choose Disk Management, or press Win + R, type
diskmgmt.mscand press Enter. - Find the drive in the lower pane. Each disk is a row (Disk 0, Disk 1 and so on), with its partitions shown as bars.
- Right-click the partition bar itself, not the disk label on the left.
- Choose Change Drive Letter and Paths.
- Click Add if the partition has no letter, or select the current letter and click Change.
- Choose a letter from the drop-down list and click OK.
- If you are changing an existing letter, Windows warns that programs relying on it may stop working. Click Yes to continue.
Changing a letter does not move or delete files, but anything that remembers the old path will break: installed programs, shortcuts, backup jobs, library folders and media players. Avoid changing the letter of a drive that has programs installed on it.
Method 2: diskpart
diskpart is useful when Disk Management hangs or the option is grayed out for a normal data partition.
- Right-click Start and choose Terminal (Admin).
- Type
diskpartand press Enter. - Type
list volume. Find your drive by its size, label and file system, and note its volume number. - Type
select volume 4, replacing 4 with your volume number. - Type
assign letter=U, replacing U with the letter you want. - Type
exit.
To remove a letter, select the volume and type remove letter=U. Check the volume number twice before you run any command in diskpart. It does not ask for confirmation, and other diskpart commands, such as clean, erase disks instantly.
Method 3: PowerShell
- Open Terminal (Admin).
- Run
Get-Partitionto list every partition with its disk number, partition number, letter and size. - Run
Set-Partition -DiskNumber 1 -PartitionNumber 2 -NewDriveLetter U, using the numbers from the list.
To add a letter to a partition that has none, use Add-PartitionAccessPath -DiskNumber 1 -PartitionNumber 2 -AccessPath U:.
Which letters to use
| Letter | Notes |
|---|---|
| A and B | Historically reserved for floppy drives. Windows lets you use them, but some older programs treat them oddly. Best avoided. |
| C | The Windows system drive. It cannot be changed. |
| D to H | Taken first by additional drives, optical drives, card readers and USB devices. |
| M to T | Common for mapped network drives in offices. |
| U to Z | Good choices for removable drives you want to keep on a fixed letter, because Windows rarely reaches them automatically. |
Keep a USB drive on the same letter
When you plug in a drive, Windows gives it the first free letter after the ones in use. Plug in a card reader or phone first, and your backup drive moves from E: to F:. To stop this:
- Assign the drive a letter near the end of the alphabet, such as U or X, using any method above.
- Windows remembers the assignment for that particular volume and reuses it next time, as long as the letter is free.
- If the drive is reformatted or repartitioned, Windows sees a new volume and you need to assign the letter again.
If a letter you chose is taken by a mapped network drive, the USB drive will not appear. Disconnect the mapping in File Explorer (right-click it and choose Disconnect) or pick another letter.
When Change Drive Letter and Paths is grayed out
- System partitions such as the EFI System Partition and Recovery partition are protected on purpose. Leave them without letters.
- Unallocated space has no volume to assign a letter to. Do not create a new volume there if the space used to hold data; see our guide to drives that show in Disk Management but not in File Explorer.
- Hidden partitions from other systems or recovery tools may need their attributes cleared in diskpart first, as that guide explains.
- An offline disk must be brought online before its partitions can get letters.
Letters that disappear on their own
If a drive keeps losing its letter, check whether automount is turned off. In an admin Terminal, run diskpart, then automount. If it says automatic mounting is disabled, type automount enable. Drives can also lose their letters after a major Windows update; our guide on a hard drive that disappeared after a Windows update covers that case.
A faster way
Disk Detector lists every connected drive, including ones File Explorer will not show, and tells you exactly why a drive is missing: no drive letter, not initialized, offline, unallocated or an unreadable file system. When the cause is a missing letter, it offers a one-click fix that assigns a free letter for you. Fixes only run when you choose them, and anything that could affect your data is clearly marked first.
That matters because a missing letter and a damaged partition can look the same in File Explorer, and the right fix for one is the wrong fix for the other. Disk Detector checks which one you have before suggesting anything.
Frequently asked questions
Will changing a drive letter delete my files?
No, but programs and shortcuts that point to the old letter may stop working until you update them.
Can I change the C drive letter?
No. Windows does not allow it for the system drive.
Why does my USB drive get a different letter each time?
Windows gives it the next free letter. Assign a later letter, such as U, and Windows usually remembers it for that drive.
