E-mail notification, help needed

Advertisement

costasppc
Joined:
Posts:
3
Location:
Athens

E-mail notification, help needed

Hello,

I am using WinSCP command line (great tool) with the following script:

option batch continue
option confirm off
open <USER>@DOMAIN -passive=on
put C:\FiletoUpload\file
exit


I need to add an e-mail notification to get success or error. I have found in the WinSCP site the following script, but how to insert it in my script?

winscp.com /script=example.txt
if errorlevel 1 goto error

echo Success
sendmail.exe -t < success_mail.txt
goto end

:error
echo Error!
sendmail.exe -t < error_mail.txt

:end

Best regards

Kostas

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: E-mail notification, help needed

That code is a Windows batch file that runs WinSCP (and its script). Not other way around.
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

In the above example the script.txt is your WinSCP script.
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

costasppc wrote:

You mean the winscp.com /script=example.txt
Yes. Sorry for mistake.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum