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

Nardog

Re: keepuptodate / Synchronize keeps uploading everything from a directory when a new file is added

martin wrote:




Martin, thank you for that resource. It does appear to a timestamp issue between filesystems. Unfortunately, I am not in control of the unix system the files are being uploaded to. Is there a way to compare files by filename and upload any files that the compare does not find instead of using timestamps? This would fix my issue. Otherwise, can you think of anyway around the problem? Really appreciate the help.
Nardog

keepuptodate / Synchronize keeps uploading everything from a directory when a new file is added

I am using `keepuptodate' to watch 5 directories. When a new file is introduced to one of the directories, it recognizes the change and then starts to upload everything in the directory from Local to Remote despite it already being present in the remote directory.

Script:
@echo off


"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\Program Files (x86)\FTP\WinSCPbatch3.log" /ini=nul ^
  /command ^
    "open ftp://user:pass@ftp.com/" ^
    "cd FTP" ^
    "cd FromCompany" ^
    "lcd C:\FTP\Company\Outbound" ^
    "keepuptodate C:\FTP\Company\Outbound /FTP/FromCompany" ^
    "exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)

exit /b %WINSCP_RESULT%


Within Local Directory C:\FTP\Company\Outbound, there are 5 subdirectories.
I tried using `synchronize both` but when i ran it, it compared all 5 directories and then tried to reupload every file again. Is there something I am missing?

Thanks for the help!