In a batch, is there a way to specify a path using the volume name instead of a drive letter ? (eg: something like \\RECOVERY\Docs\...)
Or, if not possible, is there a way to check if a specific volume name belongs to a specific drive letter (eg : if F:\ is RECOVERY do this else do that)
Here is what i want to do : to create a batch that backup one drive to another, but since both drives (source and destination) are on removable usb drives I cannot be sure that drive letters will never change. Copying backup to working folder instead of opposite would be a catastrophic failure.
\\?\Volume{GUID}
would be a good idea, see e.g. here how to find out these paths (once).mountvol C: /L
incmd
,C:
being the drive letter. I'll post this as an answer if you confirm it works. If it doesn't you can always mount these volumes to specific drive letters further back in the alphabet (X for source, Y for destination), and use these afterwards...