What about the "Automatically reconnect session, if it breaks while idle"? Is there any script to handle that?
The session generally does not go idle, when using scripting.
See also https://stackoverflow.com/q/29535466/850848
What about the "Automatically reconnect session, if it breaks while idle"? Is there any script to handle that?
option reconnecttime
has the same effect as Automatically reconnect session, if it breaks during transfer.
option batch on/off
option confirm off/continue
option reconnecttime 15
option resumesupport on (unknown option error)
@echo off
SET LOG=logfile.log
IF EXIST %LOG% (del %LOG% )
:Run_Job
FTP\winscp521\winscp.com /script=MW_FTP.txt /log=%LOG%
if errorlevel 1 goto error
echo Success
MailSend\mailsend.exe -d domain.com -smtp mailrelayapp.eu.domain.com -t me@domain.com -f me@domain.com +cc +bc -sub "MW FTP - Success" -M "All went wel." -attach %LOG%
goto end
:error
echo Error!
:: MailSend\mailsend.exe -d domain.com -smtp mailrelayapp.eu.domain.com -t me@domain.com -f me@domain.com +cc +bc -sub "MW FTP - Failed!" -M "You had issues. Please check the attached log." -attach %LOG%
goto Run_Job
:end
option batch on
option confirm off
option reconnecttime 15
open ftp://user@otherDomain.com:Password@ftp.otherDomain.com
# Change remote directory
cd /Backups/Vissie/Zam
synchronize remote C:\Data\Vissie\Vissie_Backup /Backups/Vissie/Zam -delete -transfer=automatic -criteria=size -resumesupport=on
close
# Exit WinSCP
exit