Sync based on file time and size AND file content

Get help for specific problems
Posts: 29
Joined: 9 Feb 2016

bgregory02

Is there a way to sync files based not only on the file size and time but also by file content.
I have applications that change the file date/time even though the content has not changed.
Just because the file's date/time was updated doesn't necessarily mean the content was changed.
I think this would be a great option.
Posts: 29
Joined: 9 Feb 2016

bgregory02

I was hoping Zenju would see this.
Posts: 1038
Joined: 8 May 2006

therube

What does happen if the Content is the same but the date is different?
Depends on the sync method.

Two-way, wants to copy newer to older. (Or maybe it is Right to Left?)
Mirror, wants to copy older to newer.
(Above might depend on which side is newer/older?)

Update, says do nothing.


Or are you saying that if size is the same & date is different, that you then want it to do a Content compare?
Posts: 29
Joined: 9 Feb 2016

bgregory02

I was hoping that if the dates are different but the content is the same that the file should not be considered for a sync. What I think should happen is the date/time is checked 1st. If there is a difference, THEN the content should be checked. If the content is different THEN sync. In this way the compare would be much quicker, since you wouldn't have to specify 'compare on content' by itself, since that option takes much longer to process.
Posts: 1038
Joined: 8 May 2006

therube

What type of sync & are you doing a Content compare?
Doesn't matter, actually (if you are doing a Content compare).

If you are doing a Content compare, date is simply ignored.

So if you have file A on Left & it is dated 1-1-1980,
& file B on Right & it is dated 2-10-2023,
& if you are doing a Content compare, & if they are, they will compare as equal, they will not be offered for sync.
Posts: 29
Joined: 9 Feb 2016

bgregory02

Sorry, I see you replied to me before I updated my reply. Please see my update.
Posts: 29
Joined: 9 Feb 2016

bgregory02

I was hoping that if the dates are different but the content is the same that the file should not be considered for a sync. What I think should happen is the date/time is checked 1st. If there is a difference, THEN the content should be checked. If the content is different THEN sync. In this way the compare would be much quicker, since you wouldn't have to specify 'compare on content' by itself, since that option takes much longer to process.
User avatar
Posts: 4055
Joined: 11 Jun 2019

xCSxXenon

The only issue is that both files having the same size does not mean they are the same. It is not impossible to make 30 days of changes to a file for it to end up being the same size, and then it never would get backed up following your compare proposal
Posts: 29
Joined: 9 Feb 2016

bgregory02

Let's suppose I am doing a Left to Right Mirror, and the Left side FileA is dated 1/2/2023 and is 10 bytes, Right side FileA is dated 1/1/2023 and is also 10 bytes. FileA and FileB contents are the same. Based on the comparison parameters "File time and size", Left FileA would be copied to the Right side even though the contents are the same, which would be unnecessary. If the comparison parameters "File time and size", THEN "File Content" were used, there would be no need to copy the file. Each of the Comparison options should be selectable individually instead of an "or" decision.