Page 2 of 3
Posted: 2009-09-20, 18:59 UTC
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
Posted: 2009-09-20, 19:06 UTC
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..
Posted: 2009-09-20, 19:12 UTC
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("=");
Posted: 2009-09-20, 19:18 UTC
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.
Posted: 2009-09-20, 19:37 UTC
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".
Posted: 2009-09-20, 21:55 UTC
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.
Posted: 2009-09-20, 23:28 UTC
by StatusQuo
2
Buczo
"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.
Posted: 2009-09-21, 07:09 UTC
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.
Posted: 2009-09-21, 07:30 UTC
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.
Posted: 2009-09-21, 08:17 UTC
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.
Posted: 2009-09-21, 08:21 UTC
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.
Posted: 2009-09-21, 08:27 UTC
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.
Posted: 2009-09-21, 08:37 UTC
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.
Posted: 2009-09-21, 08:52 UTC
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?

Posted: 2009-09-21, 09:00 UTC
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..
