Is it possible to use env variables into a local file URI protocol?

32 Views Asked by At

Knowing that we have the file URI protocol to reference local files in a browser bookmark as this question ( Meaning of '///' after 'file:' protocol (URL) ) already explains...

What if I wnat to use an environment variable into this path? Is it possible?

For example, I would like to use windows 'USERPROFILE' like that:

file:///%USERPROFILE%/someFolder/someFile.html

Instead of having the fixed:

file:///C:/Users/miwindowsusername/someFolder/someFile.html

0

There are 0 best solutions below