challenges with script synchronize



challenges with script synchronize

Hello, I'm having challenges with scripting synchronization. Using vs 5.13.3.

Per the documentation, if "-criteria=both":

When both options are checked, Modification time has higher priority. As a consequence, file is not considered updated, despite having different size, if the source file is older than the destination file.

That means if a file is partially uploaded, and the timestamp on the remote file is the same or newer than the original, winscp won't detect the file is incomplete and not update it. (I tested this to confirm this behavior.)

That also means "-criteria=size -preservetime" is the only way to catch incomplete files, assuming the file size changes. If, by chance it doesn't, then it won't catch an updated version.

It seems to me the "-criteria=both" should check both time AND size, regardless if time matches or is newer. Or, the timestamp on the target file should be made older than dirt until the transfer is complete, then the timestamp is set correctly.

Is there a flaw in my logic?

Thanks for you help.


Reply with quote



You can post new topics in this forum