Username in batch script retrieval

Advertisement

Whykonen
Guest

Username in batch script retrieval

Hello,

I'm trying to retrieve the username of a stored session, to use in the batch script.

Is there a parameter to retrieve UserName as defined in winscp.ini?

Thanks in advance!

Script:

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    
[/code]

Reply with quote

Advertisement

You can post new topics in this forum