Endurance - Keep reconnecting for Unlimited
Hi. Firstly I HAVE to say that you have one excellent application here. I found it a week ago out of a necessity that I have for coping over large files over a very slow and unreliable link. Who would have known that good old FTP is still the easiest way of doing this?
I have a set of scripts to find the latest DB files in a few directories, then 7Zip then into 50mb chunks. Then FTP them over.
When using the GUI, the application does EXACTLY what it should do. If I get connection issues, the application will try and reconnect indefinitely. When the link is back up, the transfer continues till all files are over. Brilliant!
As you can imagine, I then tried to do the same via scripting. All works, date stamps, changes files etc.
Just one aspect that I could not figure out was how to get from this script to auto reconnect. If there is an error, the application exits. I have used the exit error code (0 or 1) to compensate for this. But it feels like a waste as the GUI has this build in.
So my question is, can I not set these values via script? Things like under "Endurance" - "Keep reconnecting for", "Automatically reconnect session, if it breaks during transfer", etc.
I have tried
option batch on/off
option confirm off/continue
option reconnecttime 15
option resumesupport on (unknown option error)
So pls, what do I need to do, to get the same behaviour in script as what I get from the Endurance page under options?
WinSCP 512 Beta
Script I call:
@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
MW_FTP.txt:
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
I have a set of scripts to find the latest DB files in a few directories, then 7Zip then into 50mb chunks. Then FTP them over.
When using the GUI, the application does EXACTLY what it should do. If I get connection issues, the application will try and reconnect indefinitely. When the link is back up, the transfer continues till all files are over. Brilliant!
As you can imagine, I then tried to do the same via scripting. All works, date stamps, changes files etc.
Just one aspect that I could not figure out was how to get from this script to auto reconnect. If there is an error, the application exits. I have used the exit error code (0 or 1) to compensate for this. But it feels like a waste as the GUI has this build in.
So my question is, can I not set these values via script? Things like under "Endurance" - "Keep reconnecting for", "Automatically reconnect session, if it breaks during transfer", etc.
I have tried
option batch on/off
option confirm off/continue
option reconnecttime 15
option resumesupport on (unknown option error)
So pls, what do I need to do, to get the same behaviour in script as what I get from the Endurance page under options?
WinSCP 512 Beta
Script I call:
@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
MW_FTP.txt:
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