ZTree.com  | ZEN  | About...  

 Index   Back

Changing USB drive letters   [Tip]

By: Ben Kent       
Date: Jul 29,2014 at 05:05
In Response to: Changing USB drive letters (Peter Shute)

> > I have good results in WinXP by taking these steps...:
> > 1) On your desktop, right-click on the "My Computer" icon
> > 2) Left-click on "Manage"
> > 3) Left-click on "Disk Management"
> > 4) In the top right-hand window, right-click on the USB drive as it
> > is currently assigned and select "Change Drive Letter and Paths..."
> > 5) Click on the "Change..." button
> > 6) Click on the drop-down menu and select your drive letter
> I've only ever done that for internal drives. I tried it just now on a
> flash drive, and it worked, thanks.
> How does it remember what the drive letter is? Does it save its id in
> the registry or something, or does it change something on the drive? What
> happens if I put another drive of the same type in? Will it use the new
> letter, or use the old default?

Saved in the registry under, HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

The letter is reused, unless another device is already using it, in which case a different letter is used/remembered.

> One type of device that annoys me is flash card readers that take many
> kinds of cards, and which assign a different letter to each slot, even
> though all but one has no card in it. Takes me forever to work out which
> slot is which letter. I haven't got one here to test - what would happen
> if I tried to change the letter of an empty slot.

The way I deal with that is by having unique volume labels on all my external drives/cards, then use the CMD code below, so all my backup etc scripts don't need to care which drive letter a disk happens to be on.

Set _DiskName=SomeLabel
Set _Drive=
for %I in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do vol %I: 2>nul | find /i "%_DiskName%" >nul && Set _Drive=%I:
If not defined _Drive goto :eof
Echo Found %_DiskName% on %_Drive%

I also use a VBScript to generate the list of drive letters of type, to make the processing quicker.


Thread locked

Messages in this Thread

94,956 Postings in 11,969 Threads, 349 registered users, 26 users online (2 registered, 24 guests)
Index | Admin contact |   Forum Time: May 25, 2020 - 1:08 am EDT  |  Hits:31,224,069  (416 Today )
RSS Feed