Linking to a local file on Windows using a relative path (or environment variables)?

The Question:
Within Joplin I use links to local files & folders in my Windows machines. The problem is that they are absolute paths to locations within my dropbox. This can be problematic when I switch machines where the username on the path to Dropbox is different. I would like to use relative paths, or environment variables to get around this.

Someone has asked a version of this question before on this forum without a response: here

What works (absolute paths), but is not enough:
What works on my current machine, but is not robust to changing machines now, or in the future, is the following:

  1. To open the folder from Joplin:
[Open Folder](file:///C:\Users\myusername\Dropbox\Teaching) 
  1. To open a local file from Joplin
[Open File](file:///C:\Users\myusername\Dropbox\Teaching\Lecture1.pptx) 

What I have attempted:
To avoid username information, which can change, I would like to either (i) use a relative path, or (ii) use windows environment variables. I have tried

  • All versions of ./, ../../ with and without the file:// part.
  • replacing "C:\Users\myusername" with %USERPROFILE% or "C:Users\%username%", but neither work.

Specs:

  • Joplin 2.8.8 (Sync Version 3, Profile Version 41, Revision c2a6a13)
  • Windows 10 (10.0.18363)

After playing around I found a work-around: directory symbolic links

In this case I open the command prompt in administrator mode, navigate to the root directory, and issue the following command

C:\>mklink /d Dropbox C:\Users\myusername\Dropbox

Now the following links work:

[Open Folder](file:///C:\Dropbox\Teaching)
[Open File](file:///C:\Dropbox\Teaching\Lecture1.pptx)

Why not create a symlink like c:\Dropbox (see mklink command) on each machine and use that as path? We probably won't support env variables as local paths is not something we really want to support at this point.