Continuous Sych - Keeping Local Up to Date

Advertisement

blasword
Joined:
Posts:
2

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:

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: Continuous Sych - Keeping Local Up to Date

blasword wrote:

Then, I run this bat once and it works indefinitely. Is this the correct way to do this?
That's a question for you, not for us. We do not know, what you want to do.

Also, if a file is too large and doesn't finish in 120 seconds, will it be a problem in the next run?
No. It waits 120 seconds between the rounds. It does not limit a duration of a round.

Reply with quote

Advertisement

You can post new topics in this forum