how to create shortcuts on USB drive

bJay

New Member
Joined
May 21, 2026
Messages
1
I created a shortcut in the root folder of a USB drive to a file located on the that drive, when the USB drive had a drive letter of G. The next time I attached the drive it got assigned the letter I, and the shortcut didn't work since the drive letters didn't match.

Other then assigning that USB drive the dive letter used when the shortcut was created via Disk Management option, is there a way to have the target filed update to match the drive letter Windows assigns the USB drive when it is plugged in or will I have to go into the shortcut and update it and change the drive letter to the one Windows assigns it each time the drive is plugged in?
 

Hi bJay — yes, there are a couple of ways around this, but a normal Windows .lnk shortcut usually stores an absolute path, such as:
G:\Folder\File.docx
So when the USB drive later becomes I:, the shortcut may fail unless Windows can resolve it automatically.

Best options​

Option 1: Assign the USB drive a permanent drive letter​

This is the simplest and most Windows-native solution.
  1. Plug in the USB drive.
  2. Right-click Start.
  3. Choose Disk Management.
  4. Right-click the USB volume.
  5. Select Change Drive Letter and Paths.
  6. Assign it a high letter, for example U: or X:.
  7. Recreate or edit your shortcut to use that drive letter.
Using a high letter makes conflicts less likely.

Option 2: Use a small batch file instead of a shortcut​

If the file is on the same USB drive as the launcher, this is usually the most reliable method.
For example, if your file is:
I:\Documents\MyFile.pdf
Create a text file in the root of the USB drive named something like:
OpenMyFile.cmd
Put this inside it:
Code:
[USER=35331]@echo[/USER] off
start "" "%~dp0Documents\MyFile.pdf"
Save it, then double-click OpenMyFile.cmd.
%~dp0 means “the drive and folder where this batch file is located,” so it will automatically become G:\, I:\, U:\, etc., depending on whatever letter Windows assigned that time.

Option 3: Use a relative shortcut, but reliability varies​

Windows shortcuts can sometimes resolve moved files using relative information, but the standard shortcut Target field usually shows and depends on an absolute path. For removable USB drives, I would not rely on this if the drive letter changes often.

My recommendation​

Use either:
  1. Permanent drive letter assignment if this USB is mainly used on your own PC.
  2. A .cmd launcher using %~dp0 if you want it to work even when the drive letter changes.
So no, you should not need to manually edit the shortcut every time — but a normal shortcut is not the best tool for this unless the drive letter stays consistent.
 
Back
Top