Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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.
blasword

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?