Synchronize directories - identical files are shown diferent

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
sqa_wizard
Power Member
Power Member
Posts: 3864
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Focus on tasks.
OK, the "Synchronize directories" task is to make both sides identical.
Identical means by size, date and content.

If it differs by date, it has to be synchronized to be identical.
=> no need to compare by content, it has to be copied anyway
#5767 Personal license
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Maybe sync tool needs an option to check file contents before dates because this mode currently can't be realized directly with this two options 'ignore dates' and 'by contents'. Maybe visually this may be added as third state of 'ignore dates' checkbox - as 'grayed' state. So, if 'by contents' is checked and 'ignore dates' is grayed, TC will compare contents and then mark equal files with '=' or suggest to keep newer file if size/contents differ..
Buczo
Junior Member
Junior Member
Posts: 15
Joined: 2009-09-20, 14:13 UTC
Location: Poland

Post by *Buczo »

It should work like this ("by content" checked):

Code: Select all

if((size1!=size2)||(content1!=content2))
{
    if(date1<date2)
        Show("->");
    else if(date1>date2)
        Show("<-");
    else
        Show("!=");
}
else
    Show("=");
Last edited by Buczo on 2009-09-20, 19:27 UTC, edited 1 time in total.
Buczo
Junior Member
Junior Member
Posts: 15
Joined: 2009-09-20, 14:13 UTC
Location: Poland

Post by *Buczo »

Identical means by size, date and content.
It is not truth. Files are identicial if they have same name and content. Dates are atributes - like readonly.
The two files aren't diferent when one have readonly and second not.
Buczo
Junior Member
Junior Member
Posts: 15
Joined: 2009-09-20, 14:13 UTC
Location: Poland

Post by *Buczo »

Reply for MVV.
Maybe the better would be an option "Compare atributes also", then it should compare other atributes also. But maybe without "last read date".
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Buczo wrote:Reply for MVV.
Maybe the better would be an option "Compare atributes also", then it should compare other atributes also. But maybe without "last read date".
Perhaps you mean 'last modify date'. There 3 kind of dates available - create, modify, access. For comparison only modify date has meaning.
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2Buczo
"By content" option should compare contents.
It does - but additionally to the normal comparison.
Maybe the better would be an option "Compare atributes also"
Changing "ignore date" to "also by date" would just invert the existing function, doesn't it?
The default for all checkboxes is "not checked" currently - that would change, when compare by date would have to be explicitly activated by hand.

Maybe, to make it more clear, changing the current string to "also by content" would fit the current behaviour better.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Buczo
Junior Member
Junior Member
Posts: 15
Joined: 2009-09-20, 14:13 UTC
Location: Poland

Post by *Buczo »

changing the current string to "also by content" would fit the current behaviour better
Yes - this description match better to current behaviour but this is only workaround.
The compare directory tool working in two modes.
1. "by content" uncheck. It is fast but in this mode you can only assume that the compare is OK. It can only compare size and dates. In 99% it is good prediction if files are equal or not.
2. "by content" check. In this mode the contents of the files are compared. It take a long time, so there is no excuse for bad result. If the files are equal - it should be show =. Modyfication dates should not influence to the result if files are equal.

I repeat, if files have diferent atributes, it not means files are diferent.
mslav
Junior Member
Junior Member
Posts: 26
Joined: 2009-09-18, 10:59 UTC
Location: Russia

Post by *mslav »

2Buczo
I use compare directory tool every day and I don't understand what the problem is. If you want to compare by content only just set "ignore date" checkmark and that's all you need! Why you name it a "bug"?

The problem is in terms only. TC treats "identical" as "the same". If two files have different time they are not "the same". This is a clue.

Also, attribute read-only is not something like date. Attributes can be changed without file content modifications (during backup/restore etc) but date usually changed during file content modification, so it's more significant than other attributes.
Buczo
Junior Member
Junior Member
Posts: 15
Joined: 2009-09-20, 14:13 UTC
Location: Poland

Post by *Buczo »

I name it bug because in some circumstances (I show an example earlier) the result is incorect.
Like you said another date USUALY means the files are diferent. But not always. And for TC is always. And this is a bug.
Why it cannot simply work right? We can add hunderds of new checkboxes but it is all unnecesary because the only thing to change is show the files "same" if the content is the same (doesn't matter date). The modyfiaction date is metter only if files are diferent - then modyfication date shows witch file is newer.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

That's all the "!=" sign means, files have a different time stamp, not that they are different content-wise.

c:\TMP\MakeList\

Code: Select all

__ListFile1.txt	0 k	09/21/09 04:42	-a--
Contents: This
c:\BIN\CMD\

Code: Select all

__ListFile1.txt	0 k	09/21/09 04:46	-a--
Contents: Thit
SyncTool, Compare:
[x] Ignore Date, Those files are equal, ==
Why? Comparison is by Size; Size is the SAME.

SyncTool, Compare:
[x] Ignore Date
[x] Compare by Content, Those files are NOT equal, !=
Why? You are IGNORING the date, thus SyncTool is telling you they are different so YOU can decide what to do with them. If you allow date comparison the Arrows miraculously appear.

It wouldn't matter what content the same named file has, once you Ignore Date, the only result you can get is "!=" or "==". The only --> or <-- results you will get are for missing files on either side.

This is expected behaviour, TC can't guess which file you intend to keep when you wont let it make a decision based on Date.

As noted, it would be better if we had:
Compare by Content
  • [x] If date is different
  • [x] If size is different
If neither checked, then it will always compare by content. And would give the end user control.
mslav
Junior Member
Junior Member
Posts: 26
Joined: 2009-09-18, 10:59 UTC
Location: Russia

Post by *mslav »

Buczo wrote:Like you said another date USUALY means the files are diferent. But not always. And for TC is always. And this is a bug.
Why it cannot simply work right? We can add hunderds of new checkboxes but it is all unnecesary because the only thing to change is show the files "same" if the content is the same (doesn't matter date). The modyfiaction date is metter only if files are diferent - then modyfication date shows witch file is newer.
Sorry, I don't understand you. You can simply set "ignore date" and get what you want. What is the problem? If you treat files identical if they are identical by content and name only, TC will make it for you. But I treat files identical only if they have the same name, content and date. And for me this behavior is absolutely correct.
Buczo
Junior Member
Junior Member
Posts: 15
Joined: 2009-09-20, 14:13 UTC
Location: Poland

Post by *Buczo »

If you check "ignore date", then if files are diferent - you don't have information witch is newer.
It is situation: you can have fish or you can have aquarium. But the problem is that only toogether it has sense.
mslav
Junior Member
Junior Member
Posts: 26
Joined: 2009-09-18, 10:59 UTC
Location: Russia

Post by *mslav »

Buczo wrote:If you check "ignore date", then if files are diferent - you don't have information witch is newer.
It is situation: you can have fish or you can have aquarium. But the problem is that only toogether it have sense.
Now I understand you. In fact, you want to have PRIORITY of content comparison before date comparison. If the content is the same, date should be ignored. But if the content is different, date must be used to determine copy direction. It definitely make sense. So the proposal is:

- When we compare with content ON and "ignore date" ON, show the copy direction (< and >) based on files dates if content is different (instead of !=). It still shows that files are not identical (like !=), but also gives the copy direction which is more useful.

- But when we compare with "ignore date" OFF, keep the current behavior (i.e. treat files identical only if their dates are identical) regardless of "compare content" state.

It will be suitable both for you and me, am I right? :wink:
Last edited by mslav on 2009-09-21, 09:11 UTC, edited 2 times in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

mslav wrote:Now I understand you. In fact, you want to have PRIORITY of content comparison before date comparison.
I already wrote about it:
MVV wrote:Maybe sync tool needs an option to check file contents before dates because this mode currently can't be realized directly with this two options 'ignore dates' and 'by contents'. Maybe visually this may be added as third state of 'ignore dates' checkbox - as 'grayed' state. So, if 'by contents' is checked and 'ignore dates' is grayed, TC will compare contents and then mark equal files with '=' or suggest to keep newer file if size/contents differ..
8)
Post Reply