Solved Relative path shortcuts help

nums

New member
Member
Local time
8:46 AM
Messages
52
Hello.

I have a large number of folders and shortcuts on an external drive.
Example:
Folder 1
- Folder A
- Folder B
Folder 2
- Folder A
- Folder B
Folder 3
- Folder A
- Folder B

To create a shortcut from Folder 1A to Folder 3B I'd need to go <Drive>\Folder 3\Folder B however since it's an external drive and the drive letting will most likely change depending which computer it's connected to absolutes wont work.

I know it's possible to use %windir%\explorer.exe "..\..\Folder 3\Folder A" but that opens a new explorer window rather than take the current window to the destination folder, it sounds like small problem but it gets annoying quick if you have to frequently swap between folders (theyre art assets).

Is there any other way to do this or at least have it use the current window or close the old one?
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Home 64bit
CPU
i5-4670 Quad Core @ 3.40GHz
Motherboard
Gigabyte H87-D3H
Memory
8 GB
Graphics Card(s)
GTX 780
Hard Drives
Samsung SSD 840 EVO 250GB | OZC-VERTEX2 120GB
PSU
SST-ST75F-P
Hi Nums,

Short answer: There is! But not through standard link files.

Long(er) answer: Shortcut files (.lnk) on USBs, which have varying drive letters, have been a flaw in Windows for a very long time. Link files only work with absolute paths. They simply won't work on external devices because of this.

However, there is a little known path linking feature in Windows called Symbolic links which act just like a shortcut would but they are able to take in absolute paths as well as relative paths.

Windows does a great job at hiding the feature from standard users, though, as there is no way to create one from the GUI. Creating a Symbolic link requires a command that must be issued to cmd.exe.

Using your example directory tree, the command for creating a Symbolic link from Folders 1\A to 3\B would be:

Code:
mklink /d "1\C" "..\3\B"
 
Last edited:

My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
That works perfectly.
Thank you!
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Home 64bit
CPU
i5-4670 Quad Core @ 3.40GHz
Motherboard
Gigabyte H87-D3H
Memory
8 GB
Graphics Card(s)
GTX 780
Hard Drives
Samsung SSD 840 EVO 250GB | OZC-VERTEX2 120GB
PSU
SST-ST75F-P
yes, but please see Relative for caveats
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Asus
OS
Win7 64-bit Home Premium
CPU
Pentium(R) Dual-Core T4400 @ 2.20 GHz
Motherboard
whatever is in the Asus Notebook K60IJ Series
Memory
4 GB
Antivirus
Avast!
Browser
mostly Chrome, some Firefox and IE
Back
Top