Assigning a Drive letter to a USB drive

Since this is something I've had to look up twice so far, I thought I'd blog it as much for myself as for anyone else that might be interested :)

I have multiple logical drives defined on my system(s) using the DOS command Subst in a batch file that runs at startup. I just think better when I have drive X: instead of having to always point my editor or explorer window out to e:\dave\code\silverlight\Beta01\latest.

The problem arose again last night when I inserted a new 1G USB drive and it claimed Drive G:, because G: is already assigned to something. The only way to make the USB drive usable is to "subst g: /d" from a command line, and then subst it back when I'm done. And of course I'll forget, and then try to use something on Drive G:, and have to have a talk with myself about why it's not working!

The solution is to map the USB drive to somewhere else and here's how that's done:

Open an explorer window, and right-click "My Computer", then select "Manage"

On the left-hand side, you'll find "Storage" and under that will be, among other things, "Disk Management" ... select that.

This will show your drives and partitions. This looked very familiar to me, but I can't remember the reason I had to be out there before, maybe next time I'll remember how to get there quicker!

In the upper part of the right-hand display, right-click the USB drive you have installed, then select "Change Drive Letter and Paths..."

On the dialog that comes up, select "Change..." then select your drive letter of choice from the combo box and press OK.

You'll get a warning message, but that's just in case you are changing the drive letter of a disk that you have software installed to, so press "Yes" on that dialog. You are back to the Disk Management dialog now, and your newly selected drive letter is showing for your USB drive. Close this dialog, and you're done.

If you now uninstall the USB drive, and then reinstall it, it will come back up as the same drive letter as you assigned. As I was typing this, I reassigned two USB drives, one as drive O: and one as drive Q:, and both come alive at their designated drive letters, which are the same as the drive letters I have assigned them as at home, so life is now back in balance :)

posted @ Friday, July 13, 2007 11:26 AM

Print

Comments on this entry:

# re: Assigning a Drive letter to a USB drive

Left by David Arno at 7/16/2007 11:53 PM
Gravatar
A handy tip, but one that we shouldn't need to know about. The way in which local drives (such as USB sticks) install themselves on top of an existing logical or network drive is a blatant bug. Why have Microsoft never bothered to fix this bug?

# re: Assigning a Drive letter to a USB drive

Left by Bill at 7/20/2007 12:43 AM
Gravatar
Thanks. My external hard disk wasn't showing up on a new work computer as they were trying to use the same drive letter. This was what I needed.

# re: Assigning a Drive letter to a USB drive

Left by Emad at 7/20/2007 10:55 AM
Gravatar
Excellent tip! You just saved me a lot of trouble. I was about to return a USB card reader device because it was assigning drive letters over some of my network drives (I thought it wasn't reading it at all). Thanks again bro!

# re: Assigning a Drive letter to a USB drive

Left by Ramon at 8/30/2007 1:31 PM
Gravatar
I have a backup program that backs up at night to removeable USB Drive. The scheduled backup goes to G: drive (USB Drive).
However, if I swap drives....disconnect and connect a diff. drive, the new drive becomes something else..H:.
This kills my scheduled backup which is looking for G:.
Tried the "change drive letter", set both to G: but MS still assigns the second drive as H:. Subst command won't work here, tried all day. Wonder if there is a way to permanently fix a drive letter for a USB drive.
Ramon

# re: Assigning a Drive letter to a USB drive

Left by will at 9/1/2007 12:01 AM
Gravatar
When i plug in my ipod or usb it doesnt show up in my computer. i have assigned a different letter path to my USB and ipod however, it doesn't show up in My Computer and whenever i remove it and plug it back it, it resets itself and i have to re-assign the letter drive. Can you help?

# re: Assigning a Drive letter to a USB drive

Left by Dave at 9/4/2007 1:15 PM
Gravatar
Will...

This is the same symptom I have, for instance, with my camera. I believe it's the same problem I've had in the past with USB drives, but after having set the drive letters for them as I said in the blog message, I see them consistently with the same drive letters on both machines ... I had to set the drive letters on both machines, but once that was done... it just works.

Over the weekend, I plugged my camera in, and it didn't show up anywhere obvious. I took a guess that it was wanting to come in as G: because my external drive is F:. So I did a Subst G: /d to get rid of the substituted drive G, and sure enough, now I had my camera as Drive G.

If you have any subst drives, you may need to play with it to figure out where they're coming in. Once you have connectivity to it, you should be able to assign a letter as I explained.

-Dave

# re: Assigning a Drive letter to a USB drive

Left by Dave at 9/4/2007 1:22 PM
Gravatar
Ramon...

I'm doing backups to an external USB drive as well, although it's not one I remove.

The problem with trying to change the second drive to be the same drive letter is one I finally had to give up on as well. The OS must attch the drive letter to some signature on the USB drive and won't allow you to do two of them the same, unfortunately.

I don't know of a 'hard' fix for what you're trying to do. In that situation, I think I'd probably run a batch file to do a subst to either G: or H: and then have my backup go to the substituted letter. If you can't do Subst I: G:\ , you should be able to Subst I: G:\Backup. That way your backup software would always go to I:, but the reality is it's hitting one of two USB drives depending upon which you've got inserted.

Unfortunately, that means when you switch them, you have to remember to run the correct batch file, or at least run a batch file of some sort.

-Dave

# re: Assigning a Drive letter to a USB drive

Left by Wilgeno at 9/10/2007 11:46 AM
Gravatar
Thanks much - this was driving me crazy for the past few minutes. I just bought a 4gig flash drive and it just kept mapping itself to a drive letter used by one of me network mappings.

Wil G.

# re: Assigning a Drive letter to a USB drive

Left by simeon at 9/12/2007 12:47 PM
Gravatar
thanks, that's excellent. just what i needed - my parents were bugging me about a hard drive i put on, saying it kept interfering with their flashdrives & they didnt know which were which. i found this, thought it was excellent, and now think i can solve a couple of problems on my own pc.
by the way, the ipod thing - in itunes, you need to tick the box saying 'enable disk use' to see it as a drive. whether this helps the person i dont know, but it may help someone.
ciao, simeon

# re: Assigning a Drive letter to a USB drive

Left by Effendey Qiu at 9/15/2007 11:29 AM
Gravatar
Thank you so much for the trick!
I have been frustated with my WDC My Book just because it detected on "Safely Removed Hardware" but no letter was assign to it.

Thank you very much :D

# re: Assigning a Drive letter to a USB drive

Left by Dave at 9/15/2007 1:18 PM
Gravatar
The option to change/assign a drive letter is not available for my external hard drive. The drive appears in the disk management window, but is inaccesible. Why would this be? I'm running Vista

# re: Assigning a Drive letter to a USB drive

Left by Adam Smith at 9/25/2007 11:10 AM
Gravatar
Thanks! This was excellent.
I have an external USB hard-drive which i turn off with my computer every night and its usually the first thing i turn on in the morning. But this morning i put in a flash drive first and it "stole" the drive path G: so when i turned on the hard-drive that came under H:, therefore none of my music files and shortcuts would work. This solved all my problems and helped me learn something knew.
Thanks again.

# re: Assigning a Drive letter to a USB drive

Left by Angela at 10/26/2007 6:09 AM
Gravatar
Thanks for the instructions.....Helped me !!!

# re: Assigning a Drive letter to a USB drive

Left by Aman at 12/20/2007 6:27 AM
Gravatar
Awesome. Thank you soooo much....saved me a tone of time.

# re: Assigning a Drive letter to a USB drive

Left by coolsti at 12/24/2007 6:22 AM
Gravatar
I have a problem with a Western Digital My Book external hardisk and I think someone here maybe can help.

The My Book uses USB2 and has worked fine on my computer until I changed some hardware, which caused some drive letter reconfigurations. Now the problem is I cannot get the My Book to be accepted by Windows. It asks for a driver and nothing I offer is accepted. After playing with some more hardware changes, yesterday the My Book was indeed recognized and I could see it in the explorer, with a new drive letter (I added a device which pushed things down).

I thought my problem solved. But today, the same occurs. The My Book cannot connect. The hardware configuration and drive letters are the same for the other hardware.

I believe that Windows is somehow looking for something using the wrong drive letter when the My Book connects to the USB port. But I cannot change the My Book drive, that is fix it to something, because it does not connect!

Can someone help? Maybe this subst command can be used to somehow force Windows to look in a correct location?

Thanks for any help!

Steve, Denmark

# re: Assigning a Drive letter to a USB drive

Left by Don Lind at 1/10/2008 12:18 PM
Gravatar
Thanks!

I *knew* this. I figured this out myself when I got bit maybe a year or so ago. And, of course, now that I need it again, it slipped my memory... I was even in the disk/storage manager, looking around and I didn't "re-figure" it out...

And I agree with David Arno... it Microsoft should address this. And in XP, too... Sigh...

Don

# re: Assigning a Drive letter to a USB drive

Left by Ruby at 1/14/2008 9:34 PM
Gravatar
Thank you so much.. I have all my songs saved in an external drive, but itunes was having problem finding it because the drive letter was different from when I first imported it. iTunes is now able to find my songs and I dont need to re-import all the songs again =)

# re: Assigning a Drive letter to a USB drive

Left by Peter at 1/21/2008 7:14 AM
Gravatar
Is it possible to fix the drive letters used by USB memory in a 7 port USB hub? I'd like to allocate eg M to S for the 7 ports .

The application is multiple copying of files to many USB memory sticks.

# re: Assigning a Drive letter to a USB drive

Left by D Lo at 2/5/2008 1:56 PM
Gravatar
Great Information. Saved me a ton of time and resolved an ongoing issue we had at several sites that were recently upgraded to new hardware. Since the USB Drive was showing as F:, and we had a mapped Drive that was designated F:, we could not figure out why it was not showing in My Computer.

# re: Assigning a Drive letter to a USB drive

Left by AJ at 3/17/2008 4:05 AM
Gravatar
Thanks so much, for some reason my usb changed to H:/ from its original G:/, Concidering that at my university drive H is asociated to my documents it could have caused havoc with my subversion repository.

Thanks for that your a life saver.
AJ

# re: Assigning a Drive letter to a USB drive

Left by Joe E at 4/10/2008 8:41 AM
Gravatar
You really are a lifesaver. Your tip is greatly appreciated and saved me from going crazy. I wish for you to get back 100x what you have given all of us on here with this solution. Thanks so much.

# re: Assigning a Drive letter to a USB drive

Left by Paula at 5/7/2008 5:51 AM
Gravatar
Thanks so much, these are the directions I needed! They were simple and precise. It sure made it easy. Thanks alot!

# re: Assigning a Drive letter to a USB drive

Left by Bridget at 6/17/2008 11:46 AM
Gravatar
I ditto Paula's message above. Thanks much!

# re: Assigning a Drive letter to a USB drive

Left by Dave at 6/17/2008 1:07 PM
Gravatar
Funny of all the posts, this one has generated the most feedback!

Glad to hear it helps so many folks. To be honest, I've referred back to it myself at least once :)

-Dave

# re: Assigning a Drive letter to a USB drive

Left by sridharan at 6/25/2008 11:54 AM
Gravatar
Hi,

I have a external hard drive which was working normally. Once I had to change the drive letter and it has stopped working. It is seen on device manager but on disk management. I dont know how to make this drive appear on my computer. can u please help me

# re: Assigning a Drive letter to a USB drive

Left by Paul Crown at 7/1/2008 12:43 AM
Gravatar
For those who would like an automatic method to assign the drive letter to the USB, here is the batch file that I use:

@echo off

REM ...

REM USBDRVNM.BAT by Paul J Crown

REM

REM Use SUBST to assign P: to the USB drive. Then use P: for all programs on

REM the USB drive.

REM ...

REM



REM I like to use P as the drive letter for programs on my USB drive (P for portable).

set pdrive=P

set udrive=X

if .%1. == .. goto readdrive

set udrive=%1

goto setdrive



REM ...

REM I wrote a quick COM file to return the drive letter as

REM an errorlevel. You can create this file using DEBUG.COM.

REM ...

REM Instructions to create DRVLTR.COM:

REM > DEBUG

REM -a 100

REM mov ah, 19

REM int 21

REM mov ah, 4c

REM int 21

REM [enter]

REM -n DRVLTR.COM

REM -rbx

REM 0000

REM -rcx

REM 0008

REM -w

REM -q

REM ...



:readdrive

drvltr.com

if ERRORLEVEL 3 SET udrive=D

if ERRORLEVEL 4 SET udrive=E

if ERRORLEVEL 5 SET udrive=F

if ERRORLEVEL 6 SET udrive=G

if ERRORLEVEL 7 SET udrive=H

if ERRORLEVEL 8 SET udrive=I

if ERRORLEVEL 9 SET udrive=J

if ERRORLEVEL 10 SET udrive=K

if ERRORLEVEL 11 SET udrive=L

if ERRORLEVEL 12 SET udrive=M

if ERRORLEVEL 13 SET udrive=N

if ERRORLEVEL 14 SET udrive=O

if %udrive% == X goto nodrive

goto setdrive



:setdrive

subst %pdrive%: /D >nul

subst %pdrive%: %udrive%:\

goto done



:nodrive

echo Try USBDRVNM D

echo where D is the drive letter you want assigned.



:done

set pdrive=

set udrive=

# re: Assigning a Drive letter to a USB drive

Left by jan sterling at 8/19/2008 11:51 PM
Gravatar
i have vista with 6 usb ports and i hooked up flash drive to download some photos - did not know which letter to use when prompt came up for drive - did not know letter for port where flash drive was plugged in

# re: Assigning a Drive letter to a USB drive

Left by Lloyd at 9/2/2008 6:23 AM
Gravatar
bless you - this is a problem that has been plaguing me for a year.

# re: Assigning a Drive letter to a USB drive

Left by Rosagin at 9/3/2008 1:26 AM
Gravatar
Thank you so much for this great solution to my problem. I too had a hard time with my iTunes trying to locate my music. And it was such a hassle having to import thousands of music files everytime. I even bought another WD Portable drive hoping it will come out as my F drive. Woo hoo... now I know the workaround.
You are such a blessing.
Thanks again.
Peace and God bless!!!

ps: The faster way I got there was right-click My Computer from my desktop shortcut.

# re: Assigning a Drive letter to a USB drive

Left by Mark at 9/5/2008 5:34 PM
Gravatar
I use "USBDLM" for assigning drive letters to specific external drives / devices.

http://www.uwe-sieber.de/usbdlm_e.html

A little bit tricky to setup the first time but easy from the second time.

All instructions are in the help file or on the site.

# re: Assigning a Drive letter to a USB drive

Left by Lesliemedia.com at 9/16/2008 10:53 PM
Gravatar
For me this a major life saver you are a F'N hero Dude! I have Gigs upon Gigs of Video Information to encode and transcode etc.... So when I restart or turn off one of my 7 external drives (2.8 TB Total) XP would randomly move them around destroying anywhere from 4-8 hours of linked rendering. This is very cool. Thank you very much. I'm goin have to see what that flashing box on the top right side is all about....thanks

# re: Assigning a Drive letter to a USB drive

Left by CAF at 9/17/2008 7:59 AM
Gravatar
Thank you. My computer decided to reassign my USB port a different letter (I guess it didn't like it's name), so iTunes decided it couldn't find my music. I called customer support for my laptop who told me I was not covered under warranty and did not know how to reassign the port, but he did know how to tell me to go back and restore my system to a time when the port had the right letter. "Very interesting". Again, thank you for your article

# re: Assigning a Drive letter to a USB drive

Left by blogger at 10/3/2008 6:41 PM
Gravatar
Yep Win XP has is always not assigning drive letters to USB devices even when it is installed, this thread should help you get the thing working http://www.nettechguide.com/forums/showthread.php?t=1979435

# re: Assigning a Drive letter to a USB drive

Left by Frank Camp at 10/8/2008 8:47 AM
Gravatar
Brilliant my friend. Thanks for posting!!!

# re: Assigning a Drive letter to a USB drive

Left by keith at 10/17/2008 12:17 PM
Gravatar
thanks for this clear solution to the problem

# re: Assigning a Drive letter to a USB drive

Left by jags at 12/3/2008 3:59 AM
Gravatar
suppose i fix drive letter v:\ for usb drive. but suppose i map the another pc and gave the same drive letter it will change. i dont want it . i want to fix drive letter for usb drive. which can not be change. pls help me.

# re: Assigning a Drive letter to a USB drive

Left by Dave at 12/4/2008 6:59 PM
Gravatar
Hi Jags...

I have two USB drives that I carry back and forth to work. they are both set to a specific drive letter at home and the office with no problem. One is Drive O:, the other is Drive Q:

I also have a large external USB drive that is drive X: on my desktop and laptop, but drive W: at the office, and that has no problems either.

# re: Assigning a Drive letter to a USB drive

Left by davidL at 12/18/2008 8:03 PM
Gravatar
Can this be done : What I want to do is to be able to give someone a USB Flash drive, and ensure that it will always be assigned the same letter, no matter what PC it is placed in. Is that possible ?

# re: Assigning a Drive letter to a USB drive

Left by Jake Leyte at 1/6/2009 3:59 PM
Gravatar
Thanks ... most helpful.

# re: Assigning a Drive letter to a USB drive

Left by Dave at 1/6/2009 10:08 PM
Gravatar
DavidL...

Sorry I don't believe that's possible. I have two small ones and two large external HDs I use on two machines here, and also carry back and forth to work. The two small ones I've setup as Drive O: and Q: on both machines, but the main external 120G is drive Z: on both my machines here, and Z: is used at work by the system, so it is drive W: there. Causes no difficulty as long as I remember it :)

But, if I take one of them to some new machine, it tries to come up as F: or G:, or whatever.

-Dave

# re: Assigning a Drive letter to a USB drive

Left by nsg at 2/7/2009 5:21 AM
Gravatar
my problem is near your solution.actualy my device fm37 ipod is being displayed in device manager but its drive is not present in disk management utility.
all mess hapened when i disconected ipod when the data was transferring.
i want to know how its drive could be find then i will try to change the drive letter.
plz help. your post is the best of all i searched for solution..

# re: Assigning a Drive letter to a USB drive

Left by Quad at 2/7/2009 11:22 PM
Gravatar
thanks for the help! i really needed this for my external harddrive

# re: Assigning a Drive letter to a USB drive

Left by Dave at 2/21/2009 8:24 PM
Gravatar
I don't believe that's possible, Rookie...

I have 4 USB drives that I move from PC to PC and I've set them all up on each PC to have their own drive letter so I know right away which it is.

-Dave

# re: Assigning a Drive letter to a USB drive

Left by Tenlaven at 2/28/2009 9:40 PM
Gravatar
Ok, so I'm running Vista, and I just updated yesterday, and all of a sudden my USB HD is no longer recognized as drive Z:\. It's been fine up until now, even when I turn it off and back on it has stayed. Now it just grabs the next drive letter alphabetically that is not in use (it's been G, H and K). I've tried several times to reassign the drive letter to no avail, as every time I do, it suddenly doesn't show up in My Computer, and when I try to open it, I get an error message that says Location Is Not Available. So from there I can either change it back to the letter it picked up when I plugged it in before I changed it, or reset it and let it pick a new one. Is it something wrong with Vista, or am I forgetting to do something?

# Assigning a Drive letter to a USB drive

Left by Tenlaven at 2/28/2009 9:43 PM
Gravatar
I'm running Vista, and I just updated yesterday, and all of a sudden my USB HD is no longer recognized as drive Z:\. It's been fine up until now, even when I turn it off and back on it has stayed. Now it just grabs the next drive letter alphabetically that is not in use (it's been G, H and K). I've tried several times to reassign the drive letter to no avail, as every time I do, it suddenly doesn't show up in My Computer, and when I try to open it, I get an error message that says Location Is Not Available. So from there I can either change it back to the letter it picked up when I plugged it in before I changed it, or reset it and let it pick a new one. Is it something wrong with Vista, or am I forgetting to do something?

# re: Assigning a Drive letter to a USB drive

Left by Srini at 3/10/2009 6:56 AM
Gravatar
Solution worked for me. The problem caused is when i used multiple USB drives simultaneously.

# re: Assigning a Drive letter to a USB drive

Left by club penguin at 3/17/2009 5:43 AM
Gravatar
Your tip is greatly appreciated and saved me from going crazy. I wish for you to get back 100x what you have given all of us on here with this solution.

# re: Assigning a Drive letter to a USB drive

Left by Tony Z at 3/26/2009 9:47 AM
Gravatar
Bless you! I was wondering how this was done.

# re: Assigning a Drive letter to a USB drive

Left by fjyster at 4/11/2009 3:40 PM
Gravatar
I am a high school student and always use many random different computers in one day. Also, the settings and files are reset each day so if I want any shortcuts to work, I have to change the setting each time. Is there any way to either automatically set the drive letter or configure the shortcuts to point to the specific drive letter? this would really help

# re: Assigning a Drive letter to a USB drive

Left by Philip at 6/10/2009 3:22 AM
Gravatar
It worked perfectly, thank you!

Philip

# re: Assigning a Drive letter to a USB drive

Left by Jorge Sanchez at 7/6/2009 8:14 AM
Gravatar
My USB Drive doesn't have a letter at all, and when i go to right click on it, it only shows me help. The other options are there but i cannot click on them. Any suggestions????

# re: Assigning a Drive letter to a USB drive

Left by LibraryTech at 9/8/2009 1:27 AM
Gravatar
I work at a public library. We have 16 public computers. I am having trouble off and on with patrons who use their thumb drives. What happens is that the thumb drive gets assigned a drive letter, it can be accessed through command line, however, not through "My Computer".

I'm using XP SP3. What I need is a way either through a GPO or local setting to force the flash drive to use certain drive letters or NOT use certain letters.

# Thank you!

Left by Rene at 9/13/2009 9:13 PM
Gravatar
thanks very much! this has solved the problem of my backup program backing-up to the wrong USB drive/s!

# re: Assigning a Drive letter to a USB drive

Left by Junnjun013 at 9/22/2009 3:39 PM
Gravatar
Great...Than you so much very helpful indeed....

# re: Assigning a Drive letter to a USB drive

Left by Kritiker at 9/25/2009 8:09 PM
Gravatar
Thanks so much, solved my problem

# re: Assigning a Drive letter to a USB drive

Left by Ricpermar at 9/25/2009 8:15 PM
Gravatar
The solution proposed is great, but does not always work on my XP. It just sometimes goes crazy and assing a different letter to my drive. What does work always (at least for me, at least so far) is to mount the drive whatever letter it gets to a folder in the internal HD. Then just point your backups, media libraries etc to that folder.

In My PC / Management / Disk Management right click on the external drive and choose " change access letters ...". Select "Add" and then "mount to a folder". Pick up a folder and that´s it. The contents of the drive will be accesible by going to that folder. Changing your scripts, reimporting a media library can be a pain in the neck, but it will save you a lot of time afterwards.

Have fun.

# re: Assigning a Drive letter to a USB drive

Left by roy at 9/29/2009 5:21 AM
Gravatar
Thank you! This has been a problem for sooo long.

# re: Assigning a Drive letter to a USB drive

Left by JollyRocker at 10/1/2009 8:29 PM
Gravatar
Yey!! Thank you so much!!!

My "invisible" USB sticks have been doing my head in!!

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345