Welcome to FreeSoftwareServers Confluence Wiki
https://superuser.com/questions/1488306/stripping-down-to-just-user-folder-from-userprofile-batch/1488310#1488310
set USERDIR=%USERPROFILE:C:\Users\=%