Synchronize

Advertisement

Roger
Guest

Synchronize

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

Reply with quote

Advertisement

guest
Guest

Synchronize

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

Reply with quote

alf
Joined:
Posts:
2
Location:
France

Up

I had forgotten to register. Now it's done :D
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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Re: Synchronize

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.

Reply with quote

Advertisement

alf
Joined:
Posts:
2
Location:
France

OK

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 ?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Re: OK

Citing documentation:
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.

Reply with quote

Priyaranjan
Guest

Problem with criteria=botn

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?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Re: Problem with criteria=botn

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.

Reply with quote

Advertisement

You can post new topics in this forum