This is a slightly different problem, but the solution may be of use.
I have a large collection of ePub (Book) files stored in a tree structure by genre and author name. [eg. Q:\SFF\B\Bloggs, Fred\Space Wars.epub]. When an author uses a number of pen-names, I put shortcuts in the author folder pointing to the alternate folders with the other names. When I copied the entire Library to a portable hard drive, the shortcuts failed.
The solution was to create an Environment Variable "Z" with value of the original drive path [in this case "Q:\"] on the source PC.
Then right-click on the shortcut and select "Properties".
In the "Target" area, replace the Drive [in this case "Q:\"] with "%Z%" and save. [If the Environment variable does not complete a path to an existing file or folder, save will not work.]
When the portable drive is plugged into another PC, it could be assigned any drive letter. Set [or change] the value for the Environment Variable "Z" to the correct drive letter and then all the modified shortcuts will work.
I chose "Z" but the Environment variable could have any (unused) name. "%Z%" has the same number of characters as "Q:\" and I have not yet written a program to scan my library and modify all the shortcuts to relative - that's the next major project.
The following batch file "Z_Relative.bat" placed on the portable drive can be run to set the Environment Variable.
REM Batch file to set the Environment Variable "Z" to the current drive.
REM Place in root directory of USB drive to setup relative shortcuts
REM WITHIN the drive if run from there.
IF NOT %Z%==%CD% SETX Z %CD%
(This is required because %CD% only works in Command Prompts and won't work in a shortcut.)