failure notifications?

Advertisement

escott
Guest

failure notifications?

hi,

I am looking to set up an sftp transfer to take place automatically every few minutes. winscp3 appears to be able to do everything I need, but for one:

Is it possible to set up winscp so that it notifies me in case of any kind of error or failed transfer? an email automatically sent to me would suffice, but is there a way to set up a winscp3 script to do this?

Reply with quote

Advertisement

Guest

Re: failure notifications?

escott wrote:

Is it possible to set up winscp so that it notifies me in case of any kind of error or failed transfer? an email automatically sent to me would suffice, but is there a way to set up a winscp3 script to do this?

You can't do the notification from winscp itself, but as it returns an errorlevel of 1 in case of error, it is very simple to trap it and send any kind of notification you like after that (event logging, sending email, ...). You will need to use external tools for the notification but there are plenty available.

eg:
@ECHO OFF
:loop
winscp3.exe /console ...
IF ERRORLEVEL 1 CALL :error-notification
:: wait 1 minute
ping -n 60 127.0.0.1 >NUL
GOTO loop
::
:error-notification
sendmail ...
logevent ...
GOTO :EOF

Reply with quote

Advertisement

You can post new topics in this forum