This is the example, a shortcut was installed to this code
:
@echo off
::@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
:: $Header: C:/DBAREIS/Projects.PVCS/Win32/ScriptingTipsAndTricks/EXAMPLE[cmd].ProfileRoot() [works out the root Documents+Settings directory].cmd.pvcs 1.0 11 Jul 2014 19:31:02 USER "Dennis" $
::@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
setlocal
call :ProfileRoot
echo PROFILES: ROOT: %ProfileRoot%
goto :eof
::++++++++++++++++++++++++++++++++
:ProfileRoot
::++++++++++++++++++++++++++++++++
set ProfileRoot=%USERPROFILE%\..
for %%x in ("%ProfileRoot%") do set ProfileRoot=%%~fx
goto :EOF