Fixed the problem, i used
for /F "delims=" %%a in ('findstr /c:UserName WinSCP.ini') do set username=%%a
for /F "delims=" %%a in ('findstr /c:UserName WinSCP.ini') do set username=%%a
IF EXIST "C:\Users" goto nietwinxp
IF EXIST "C:\Documents and Settings" goto winxp
:nietwinxp
echo nietwinxp
winscp.com /script=nietwinxp.txt
if errorlevel 1 goto error
goto end
:winxp
echo winxp
winscp.com /script=winxp.txt
if errorlevel 1 goto error
goto end
:error
cscript sendmail.vbs addresseddude@provider.com "subject line" "Content, username here"
:end
PAUSE