Topic "Synchronize"

Author Message
Roger

Guest


When I select both the file size and modification time parameter when using ftp, the program don't synchronize files with diffrent file size. But if I only use the file size parameter it work fine.

So is it not possibly to use both parameters at same time?

Version 4.0.7
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
It should work. What other options have you selected?
_________________
Martin Prikryl
guest

Guest


Hello,

I am trying this wonderful tool, and I have the same problem with the synchronize script command (for a FTP upload), version 4.1 beta:
synchronize -delete -criteria=both remote d:\test\dirToUpload testFTP/

If I modify the content of the file to upload, it will be not uploaded. If I change the command with -critera=size, it works fine...

And a little question for a good understanding of the parameter criteria=both :
For example: I change the content of my local file for just one octet, the size is the same. Then I want to upload it to a ftp site with the synchronize remote command,
the synchronize parameter criteria=both means :
* file size modification AND time modification ? (In this case, the file will not be uploaded (because the file has the same size))
* file size modification OR time modification ?(In this case, it will.)

Thanks for your help
alf
[View user's profile]

Joined: 2008-04-06
Posts: 2
Location: France
I had forgotten to register. Now it's done Very Happy
The previous post is still a problem for me :

I am trying this wonderful tool, and I have the same problem with the synchronize script command (for a FTP upload), version 4.1 beta:
synchronize -delete -criteria=both remote d:\test\dirToUpload testFTP/

If I modify the content of the file to upload, it will be not uploaded. If I change the command with -critera=size, it works fine...

And a little question for a good understanding of the parameter criteria=both :
For example: I change the content of my local file for just one octet, the size is the same. Then I want to upload it to a ftp site with the synchronize remote command,
the synchronize parameter criteria=both means :
* file size modification AND time modification ? (In this case, the file will not be uploaded (because the file has the same size))
* file size modification OR time modification ?(In this case, it will.)



Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
guest wrote:
For example: I change the content of my local file for just one octet, the size is the same. Then I want to upload it to a ftp site with the synchronize remote command,
the synchronize parameter criteria=both means :
* file size modification AND time modification ? (In this case, the file will not be uploaded (because the file has the same size))
* file size modification OR time modification ?(In this case, it will.)

OR is true.
However note that some FTP servers report timestamp with minute (or even hour) precision only. Hence if you change the file too soon after the last change, WinSCP may not notice the difference. Can this be a cause of your problem? If possible use SFTP.
_________________
Martin Prikryl
alf
[View user's profile]

Joined: 2008-04-06
Posts: 2
Location: France
You're right. the external hosted FTP server report timestamp with minute.
It explains some of my problems .

But if I upload a text file then I modify it juste a few seconds after (with change of the size), and I want to re-uplooad it in the same minute
* -criteria=size --> the file is uploaded
* -criteria=both (time modification OR size modification) --> the file is NOT uploaded. The file would be uploaded too, no ?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Citing documentation:
Quote:
When both options are checked (GUI equivalent of 'both'), modification time has higher priority. As a consequence, file is not considered updated, despite having different size, if it is older

Would it explain the issue? Note that you may have local/remote clocks out of sync (or different timezones), hence even recently modified local file may have older timestamp than older remote file.

Also I have raised this issue, inspired by this thread.
Priyaranjan

Guest


My understanding of the criteria=both dialogue would be if one of them (size,time) is different, the file should be synchronized. I have used the criteria both thinking if the file is modified or size has been changed then the file will be uploaded. I just failed to do that for my project which I test ran today. I will change it to size as it is a stream of data generated on that computer. But think of my question, is it beneficiary to have an option which says change of one or the other will upload the file or just use two lines of code saying synchrozie criteria=size and one more line with time?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Priyaranjan wrote:
My understanding of the criteria=both dialogue would be if one of them (size,time) is different, the file should be synchronized. I have used the criteria both thinking if the file is modified or size has been changed then the file will be uploaded. I just failed to do that for my project which I test ran today. I will change it to size as it is a stream of data generated on that computer. But think of my question, is it beneficiary to have an option which says change of one or the other will upload the file or just use two lines of code saying synchrozie criteria=size and one more line with time?

Your understanding is correct. WinSCP transfers the file if either time or size changes.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License