Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

costasppc wrote:

You mean the winscp.com /script=example.txt

Yes. Sorry for mistake.
costasppc

Thank you,

You mean the winscp.com /script=example.txt
martin

In the above example the script.txt is your WinSCP script.
costasppc

Thank you for your reply,

Is there a way to combine both my code and the notification code?

Best regards

Kostas
martin

Re: E-mail notification, help needed

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

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