Topic "failure notifications?"

Author Message
escott

Guest


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?
Guest




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:
Code:
@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
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License