1.    27 Sep 2016 #1
    Join Date : Sep 2016
    Posts : 7
    Windows 10

    Permanently assign drive letters for USB drives


    Hi,

    I run a backup script to different USB drives at different times.

    The backup script always needs to see the same drive letter for the USB drive (whichever USB drive is being used).

    I know you can run compmgmt.msc, select Disk Management and then click 'Change drive letter and paths' to manually set a drive letter.

    However, sometimes Windows remembers the drive letter that was manually set, but sometime it forgets.

    Is there a way to permanently set a drive letter assignment for the USB drives?

    Thanks in advance
      My ComputerSystem Spec
  2.    27 Sep 2016 #2
    Join Date : Sep 2016
    Posts : 7
    Windows 10
    Thread Starter

    One other thought, if there isn't a way to permanently set a drive letter to the USB drives, is there a registry key which can make the change (that way I can just click a .reg file to make the change....)

    Thanks!
      My ComputerSystem Spec
  3.    28 Sep 2016 #3
    Join Date : Jul 2014
    Serbia
    Posts : 10,179
    W10 Insider + Linux

    I don't know of any way to do it natively from Windows because drive letter is windows function and doesn't stay on the drive itself.
    You can try this: Download USB Drive Letter Manager (USBDLM) - MajorGeeks for instance.
      My ComputersSystem Spec
  4.    28 Sep 2016 #4
    Join Date : Jan 2015
    UK, Midlands
    Posts : 10,467
    Win 10 Pro (1703)

    Quote Originally Posted by robocop View Post
    Hi,
    I run a backup script to different USB drives at different times.
    The backup script always needs to see the same drive letter for the USB drive (whichever USB drive is being used).

    I know you can run compmgmt.msc, select Disk Management and then click 'Change drive letter and paths' to manually set a drive letter.

    However, sometimes Windows remembers the drive letter that was manually set, but sometime it forgets.
    Using Disk Management is what I do - no problems I've noticed. But I could believe your experience...
      My ComputerSystem Spec
  5.    28 Sep 2016 #5
    Join Date : Jul 2015
    Posts : 3,655
    10 Pro

    You could also check that you are using the correct USB in your script so you don't backup to the wrong one...

    For example, make a small file on your USB F drive called USBF...
    Code:
    if exist "F:\USBF" (
        rem whatever you want to do....
    ) else (
        echo Drive letter is wrong.
    )
      My ComputerSystem Spec
  6.    28 Sep 2016 #6
    Join Date : Sep 2016
    Posts : 7
    Windows 10
    Thread Starter

    Thanks very much for the replies.

    lx07, that's an awesome idea which I didn't realise was possible. If the drive letter was wrong my batch script was running and completing as though it had been successful - Doh! I've now added your code to the script with a pause, so it now stops if it can't find the right file. Perfect!

    Cheers
      My ComputerSystem Spec
  7.    08 Dec 2016 #7
    Join Date : Nov 2016
    Posts : 10
    Win10

    Code:
    set USBDRIVE=
    FOR %%D IN (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 (DIR %%D:\USB.TAG  > nul 2>&1 && (call set USBDRIVE=%%D:)
    if "%USBDRIVE%"=="" echo ERROR: NO USB DRIVE FOUND & pause
    echo USB IS %USBDRIVE%
    Use this to search all drive letters for \USB.TAG file.
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
Solved Drive Letters
When I plug a USB stick in any USB port the laptop allocates the next available letter to this drive - "E" - this applies to any USB stick I normally use. EXCEPT for one particular USB stcik which always shows up as "G" even though "E" and "F"...
Drivers and Hardware
How to assign a range to drive letters in Windows 10.1
Greetings, Just one practical question. How do I assign a range of letters, that can be used for e.g. external flash disks, external ssd's/hdd's or memory cards? I have this nasty issue. I have two Network Attached Drives, on server. They work...
Drivers and Hardware
Unable to assign drive letters after Win10 Upgrade
Hey everyone, This seems like a cool place with a lot of people that might be able to help me out. I tried the Windows 10 upgrade when it first came out and immediately went back to 8.1 when I couldn't get a single one of my internal SATA...
Drivers and Hardware
Cannot mount network drives - drive letters not available
Hi I have a strange problem. I have some harddrives on a "server" computer in my homenetwork running win 7. From my "client" running windows 10 I am mounting these drives using psexec \\server -u username -p password -d net share F=F:\...
Network and Sharing
Cannot assign a drive letter
Hi folk. I have an external drive where the electronics of the case has failed. I have switched the drive into my pc so that I can use it as an internal drive. The drive is still operational but I cannot see it listed in my drives. Opening up disk...
Drivers and Hardware
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:46.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums