Windows 10: Why does a flash drive with no partitions show a drive letter?

Discus and support Why does a flash drive with no partitions show a drive letter? in Windows 10 Drivers and Hardware to solve the problem; Windows 10 I've run into something interesting that I cannot explain: Suppose that you select a flash drive in Diskpart and perform a "clean" on it.... Discussion in 'Windows 10 Drivers and Hardware' started by hsehestedt, Dec 10, 2020.

  1. Why does a flash drive with no partitions show a drive letter?


    Windows 10

    I've run into something interesting that I cannot explain:

    Suppose that you select a flash drive in Diskpart and perform a "clean" on it. In theory, all partitions are wiped out and we should have a completely blank disk. However, diskpart still shows a drive letter associated with the volume which is shown with a status of "Unusable".

    Here is an example:

    Code:
    If you look in File explorer you will see this:


    Why does a flash drive with no partitions show a drive letter? [​IMG]


    This behavior was causing a problem for me because I had some code that was trying to find the first available drive letter. The code would rely upon the fact that trying to perform certain operations on a non-existant drive letter would result in an an error. However, in this case , the code was not failing when it tried to access the D: drive. Here is an example:

    Code:
    So, note that performing a "cd d:" from a command prompt does NOT fail, however, performing a "cd d:" DOES fail.

    The nature of my code was such that the failure mode was not at all obvious and it took me about 2 and a half hours to find that this was the culprit. The fix was the addition of a single backslash to my code. Doh!

    It's worth noting that this same behavior occurs for all removable media, but not hard disks.

    In any case, my question is simply this: Why on earth do removable disks with no partitions have a drive letter assigned to them but fixed disks do not?

    :)
     
    hsehestedt, Dec 10, 2020
    #1
  2. Lazzer408 Win User

    help. USB drive isn't assigned a drive letter.

    Any usb flash drive I plug into my computer isn't assigned a drive letter. The physical drive shows in the "safely remove hardware" but it doesnt show up in disk management. I have tried to populate the volume thru the safely remove hardware properties window and it does pop up in the list but it doesn't stay there. This isn't a format or assign a letter problem. It's more complicated then that. Maybe one of the services needed for usb drive management was disabled? Suggestions needed. btw external usb harddrives work fine.
     
    Lazzer408, Dec 10, 2020
    #2
  3. Arun B J Win User
    Problem with letter drives confusing Sony Vegas

    Hi,



    Thank you for posting your query in Microsoft Community.



    I understand your concern and will assist you to resolve this issue.

    I suggest you to follow the steps below and check if it helps.

    • Open Disk Management (press [Win] +[R], type "diskmgmt.msc", and press [Enter]).
    • In the lower pane, right-click on the partition that you want to change drive letter, and click "Change Drive Letter and Paths"
    • A dialog should come up, showing the partition's current drive letter. Even if it is correct, click [Change].
    • From the dropdown, select any new letter, and then [OK] your way back to Disk Management. And check if it helps.


    Hope this information is helpful. Do let us know if you need any further assistance, we'll be glad to assist you.
     
    Arun B J, Dec 10, 2020
    #3
  4. Why does a flash drive with no partitions show a drive letter?

    Drive letter on OEM Partition

    Microsoft is aware that previously-hidden partitions are improperly being assigned drive letters after installing the April 2018 Update. As a result, they now appear in Disk Management and File Explorer. These partitions are typically recovery partitions
    used by the Windows Recovery Environment or by the Original Equipment Manufacturer. It is not recommended that you attempt to delete or reformat these partitions as this may have adverse effects on your ability to recover Windows. Microsoft is currently working
    to address the issue in a future Windows Update, and we’ll update this thread when a solution becomes available.

    (Update 5/14/18: The solution that will soon be released via Windows Update will only prevent this issue from occurring for devices that install the April 2018 Update after the solution is released. If you've already installed the April 2018 Update and are
    experiencing this issue, you'll need to follow the steps below if you want to hide these partitions.)

    Although you can safely ignore these partitions, if you prefer do away with the low disk space warnings and hide the partitions so they no longer appear in File Explorer, you can do so by manually removing the partition’s assigned drive letter. To do this:

    1. Select the Start button, type cmd and then right-click Command Prompt in the search results and select Run as administrator.

    2. In the Administrator: Command Prompt window, type diskpart and press Enter.

    3. Type list volume and press Enter.

    4. Make note of the volume number for the drive letter you want to remove. For example, if the drive letter you want to remove is Drive “G”, note the volume number for Drive G.

    5. Type the following command, and press Enter.

    select volume <volume number>

    When typing this command, in place of <volume number>, substitute the volume number you made note of in Step 4. In the example above, if the volume number for drive G is 5, you would type: select volume 5

    6. Type the following command and press Enter.

    remove letter=<drive letter>

    When typing this command, in place of <drive letter>, substitute the drive letter you want to remove. In this example, you would type: remove letter=G

    7. Close the Command Prompt window.
     
    Andre Da Costa, Dec 10, 2020
    #4
Thema:

Why does a flash drive with no partitions show a drive letter?

Loading...
  1. Why does a flash drive with no partitions show a drive letter? - Similar Threads - Why does flash

  2. Partition drive letter disappears!

    in Windows 10 Gaming
    Partition drive letter disappears!: I have a new laptop with Windows 11 installed. I created a partition and assigned it the drive letter Z. Sometimes after rebooting, or after waking up the drive letter simply disappears, the partition name is there but not the letter. The partition is fine, I have to reassign...
  3. Partition drive letter disappears!

    in Windows 10 Software and Apps
    Partition drive letter disappears!: I have a new laptop with Windows 11 installed. I created a partition and assigned it the drive letter Z. Sometimes after rebooting, or after waking up the drive letter simply disappears, the partition name is there but not the letter. The partition is fine, I have to reassign...
  4. flash drive does not show when inserted

    in Windows 10 Gaming
    flash drive does not show when inserted: how to get flash drive to show when inserted https://answers.microsoft.com/en-us/windows/forum/all/flash-drive-does-not-show-when-inserted/23a8102d-849c-4cce-bd8e-47cb64db5375
  5. flash drive does not show when inserted

    in Windows 10 Software and Apps
    flash drive does not show when inserted: how to get flash drive to show when inserted https://answers.microsoft.com/en-us/windows/forum/all/flash-drive-does-not-show-when-inserted/23a8102d-849c-4cce-bd8e-47cb64db5375
  6. Partition a USB Flash Drive

    in Windows 10 Gaming
    Partition a USB Flash Drive: I followed :https://www.wikihow.com/Partition-a-Thumb-Drive - to partition USB Flash But I got an error in partitioining the second part , it says "The operation failed to complete because the Disk Management Console view is not up-to-date" tried to refresh or restart but...
  7. Partition a USB Flash Drive

    in Windows 10 Software and Apps
    Partition a USB Flash Drive: I followed :https://www.wikihow.com/Partition-a-Thumb-Drive - to partition USB Flash But I got an error in partitioining the second part , it says "The operation failed to complete because the Disk Management Console view is not up-to-date" tried to refresh or restart but...
  8. Partitioning a Flash Drive

    in Windows 10 Network and Sharing
    Partitioning a Flash Drive: I purchased a Samsung 2 Tb flash drive and tried to partition it. It appeared that I first needed to change it from exfat to NTFS so I did using Windows 10 Disk Management. I then created a 1 Tb partition that appears to be okay but I haven’t tried using it yet. I then...
  9. Partitioning a Flash Drive

    in Windows 10 Gaming
    Partitioning a Flash Drive: I purchased a Samsung 2 Tb flash drive and tried to partition it. It appeared that I first needed to change it from exfat to NTFS so I did using Windows 10 Disk Management. I then created a 1 Tb partition that appears to be okay but I haven’t tried using it yet. I then...
  10. Partitioning a Flash Drive

    in Windows 10 Software and Apps
    Partitioning a Flash Drive: I purchased a Samsung 2 Tb flash drive and tried to partition it. It appeared that I first needed to change it from exfat to NTFS so I did using Windows 10 Disk Management. I then created a 1 Tb partition that appears to be okay but I haven’t tried using it yet. I then...