Continuous Sych - Keeping Local Up to Date
There are some similar posts but I would like to confirm the full process that I have done.
I created a bat file like this:
Then, I run this bat once and it works indefinitely. Is this the correct way to do this?
Also, if a file is too large and doesn't finish in 120 seconds, will it be a problem in the next run?
I created a bat file like this:
@echo off :loop "C:\Program Files\WinSCP\WinSCP.com" ^ /command ^ "open sftp://ubuntu@xxxxxxxx.com/ -hostkey="xxxxxxxxxx" -privatekey="xxxxxxx" -timeout=180 -rawsettings PingType=1" ^ "synchronize local c:/shares /var/www/shares" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) timeout /t 120 goto loop
Then, I run this bat once and it works indefinitely. Is this the correct way to do this?
Also, if a file is too large and doesn't finish in 120 seconds, will it be a problem in the next run?