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

This article is part of the GWB Archives. Original Author: Dave Campbell

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.