Link to home
Start Free TrialLog in
Avatar of Matt Bartlett
Matt BartlettFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to link to a folder path with variable username

Is it possible to create a hyperlink with %USERNAME% in the file path on Sharepoint?

I want to create a link to this folder:
C:\Users\%USERNAME%\AppData\Roaming\

but when I click on the hyperlink nothing happens. I can successfully make hyperlinks to folder paths without the %USERNAME%

Looking at the path it is trying to access the "%" part seems to turn into "%25"
I have tried "%%" but then I get "%25%25"

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Greg Besso
Greg Besso
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are you just using the "Insert a Link" from the ribbon?

In most cases it is not possible. A link, even to the file system is an html tag and variable as you describe are not support. Using some above information for the post above (which is really good), you should be able to use Javascript of jQuery to determine the user name and then use it in the link.

Good luck...