Maybe something here helps.
https://superuser.com/questions/1132288/windows-command-prompt-get-relocated-users-documents-folder
--please don't forget to upvote
and Accept as answer
if the reply is helpful--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm writing a guide for something and I want to be able to direct people to a location in Documents even if they've moved where Documents is located. So far all my attempts end up at "C:\users\username\documents\".
Let's say I moved Documents to "D:\Documents\". When I type %UserProfile%\Documents\ in to Windows Explorer I'm taken to "C:\Users\username\Documents\" instead of "D:\Documents\". The same happens if I try "%AppData\..\..\Documents\".
Documents Location UI: https://imgur.com/a/RIrGn3Y
Edit: I want to be able to include a path to a file or folder in Documents in my guide so that people can copy/paste it in to Windows Explorer or Command Prompt to open the file or location without needing to search around.
If a person moved Documents to "D:\Documents\" and I want them to open the configuration located at "Documents\Fallout 3\Fallout.ini", what would the path look like for them to copy/paste? Every attempt I make produces an error because it searches "C:\users\username\documents\Fallout 3\Fallout.ini" which doesn't exist if the Documents folder has been moved!
Maybe something here helps.
https://superuser.com/questions/1132288/windows-command-prompt-get-relocated-users-documents-folder
--please don't forget to upvote
and Accept as answer
if the reply is helpful--
If you explicitly use System environment variables like %UserProfile%,
it is normal that %UserProfile% + "xxx" gives the value of %UserProfile% concatened with "xxx"...
If you list the variables with set in a cmd window, you will see the value of %UserProfile%
Again, what I want to do is include in my guide written instructions that don't involve navigating the registry or using a Command Line parameter etc., I want something dead simple for this scenario but it sounds like that may just not be possible.