Include drive by volume label/ID instead of drive letter

I’ve got a scheduled backup setup for a USB drive.

Problem is I’m constantly adding/removing USB drives, so the drive letters change randomly.

This creates a problem because the backup is looking for drive F: which is not constant.

Is there a way of checking the volume label and/or ID instead of the drive letter?

I’ve searched through the advanced options but couldn’t find anything relevant.

My best suggestion (assuming you’re under Windows hence the drive letters) is to go into Disk Manager and dedicate a drive letter to the particular drive you’re using for this backup. You can dedicate a higher letter that isn’t as likely to be subject to dynamic drive lettering as you add and remove removable drives.

1 Like

You could also try using --alternate-destination-marker (only the drive with the text file having the right name will be used) and --alternate-target-paths (only look at these paths for the destination).

For more detail on the issue, see this:

I can’t find my notes on it right now, but there’s also a possible way to use --run-script-before with WMI drive enumeration which would let you grab a drive letter for a specific volume name then POSSIBLY pass that into the backup job as the destination. I hadn’t played with it beyond theory, though, so I’m not positive it would work.

1 Like

To avoid the randomness, check out Uwe Sieber’s USB Drive Letter Manager for Windows (USBDLM).

1 Like

All great replies thanks, but JonMikeIV’s suggestion looks like the best solution as it seems very robust. Thanks heaps.