Before posting, please read how to report bug or request support effectively.

Username
Subject
Message body
Options

This confirmation is required for unregistered users only.
Enter the code exactly as you see it. The code is case sensitive and zero has a diagonal line through it.
If you are visually impaired or cannot otherwise read this code please contact the administrator for help.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.
[Allowed Extensions and Sizes]

Topic review

Author Message
prikryl
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.
Priyaranjan
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?
prikryl
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.
alf
PostOK
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 ?
prikryl
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.
alf
PostUp
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.
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
prikryl
It should work. What other options have you selected?
Roger
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

Search winscp.net

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

About donations

Associations

Kyplex Cloud Security Seal - Click for Verification

Site design by Black Gate

WinSCP Privacy Policy

WinSCP License