Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an external hard drive that I connect often to my computer. At some point it was assigned letter G: and based on that my other software works.

Nowadays, suddenly it gets letter F:

Is there any way I can use a batch script to change the letter from F: to G:. I don't mind running the batch script manually?

If so, what is the code I should use and will it need administrative permissions?

share|improve this question
1  
See diskpart and yes you need admin. In theory it should have remembered the drive letter, consider changing it manually on disk management first. –  Bob Jul 28 '13 at 18:31
    
@Bob: It could be that it only remembers drive letters after they have been assigned manually at least once. –  grawity Jul 28 '13 at 19:57
    
Thanks! I have changed it a couple of times manually, but everytime it goes back to the old one. –  Eshwar Aug 6 '13 at 14:42
add comment

1 Answer 1

There are several methods:

  • mountvol – use it once to delete an existing letter, then again to assign a new one;

  • Disk Management (or whatever it is called in Win8), found in compmgmt.msc among other places;

  • diskpart.

Whichever you choose, assigning once should be enough, the assignment will be remembered afterwards.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.