Synchronize directories - identical files are shown diferent
Moderators: Hacker, petermad, Stefan2, white
Synchronize directories - identical files are shown diferent
This problem is in every version of Total Commander.
When you click synchronize directories and set "by content" option, then when you compare, the identical files have got -> or <- if the modyfication dates are diferent.
If you set also "ignore date" then the diferent files are shwon only as != and there is no -> or <- information.
In my opinion if the files are identical they should by shown as "=" the modyfication dates are no important because the files are identical.
When you click synchronize directories and set "by content" option, then when you compare, the identical files have got -> or <- if the modyfication dates are diferent.
If you set also "ignore date" then the diferent files are shwon only as != and there is no -> or <- information.
In my opinion if the files are identical they should by shown as "=" the modyfication dates are no important because the files are identical.
- sqa_wizard
- Power Member
- Posts: 3896
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Sorry, I cannot reproduce this.If you set also "ignore date" then the diferent files are shwon only as != and there is no -> or <- information.
Identical files which differ by date only are shown as such (=) here.
By chance you compare two files which just differ by their used linefeed.
Open the files in an editor and have a look at their format.
You probably will see that one has "DOS" format with CRLF linefeed and the other has "UNIX" format with LF linefeed.
#5767 Personal license
I have written two diferent situations.
1. The two files are identical but the modyfication dates are diferent. If you check "by content" - it shows <- or ->. If you check "ignore date" also - then it is good =.
2. The two files are diferent. If you check "by content" only - it shows good (-> or <-). If you check also "ignore date" it only shows != and you don't know witch is newer (no <- and ->).
So the task is: compare two directories. It should show witch files are equal, and if they are not equal - show witch is newer.
You can't do this. If you check only "by content", then they show identical files as diferent (<- or ->). And if you check also "ignore date", then it isn't show witch of diferent files is newer - it shows only equal or not equal.
1. The two files are identical but the modyfication dates are diferent. If you check "by content" - it shows <- or ->. If you check "ignore date" also - then it is good =.
2. The two files are diferent. If you check "by content" only - it shows good (-> or <-). If you check also "ignore date" it only shows != and you don't know witch is newer (no <- and ->).
So the task is: compare two directories. It should show witch files are equal, and if they are not equal - show witch is newer.
You can't do this. If you check only "by content", then they show identical files as diferent (<- or ->). And if you check also "ignore date", then it isn't show witch of diferent files is newer - it shows only equal or not equal.
- sqa_wizard
- Power Member
- Posts: 3896
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
- sqa_wizard
- Power Member
- Posts: 3896
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
I'm sure the files are identical.
Do this:
1. Create file test.txt (Shift+F4) and write to it text "abcd". Save it.
2. Copy this file to another directory.
3. Open this file and append letter "e", then press backspace to erase letter "e" and save changes.
4. Compare this two directories and check option "by content". The result will be <- or ->. And it should be =. Even the sizes are the same - 4 bytes.
Do this:
1. Create file test.txt (Shift+F4) and write to it text "abcd". Save it.
2. Copy this file to another directory.
3. Open this file and append letter "e", then press backspace to erase letter "e" and save changes.
4. Compare this two directories and check option "by content". The result will be <- or ->. And it should be =. Even the sizes are the same - 4 bytes.
I never had any problems with sync tool.
If I have options 'ignore dates' and 'by content' unchecked, TC suggests to replace older file with newer one.
If I check 'ignore date', TC thinks that files are equal (mark them with '=') when sizes are the same.
If I check only 'by content', TC suggests to replace older files with newer, and compares contents if dates are equal and mark with '=' files with same dates and contents.
When I check both 'by contents' and 'ignore dates', TC compares only contents and shows '!=' for different contents and '=' for equal.
If I have options 'ignore dates' and 'by content' unchecked, TC suggests to replace older file with newer one.
If I check 'ignore date', TC thinks that files are equal (mark them with '=') when sizes are the same.
If I check only 'by content', TC suggests to replace older files with newer, and compares contents if dates are equal and mark with '=' files with same dates and contents.
When I check both 'by contents' and 'ignore dates', TC compares only contents and shows '!=' for different contents and '=' for equal.
- sqa_wizard
- Power Member
- Posts: 3896
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
In case of one file is newer than the other, there is no need to compare by content at all.
The newer file will be copied over the older by default.
This rule respects the fact that the newer file has the latest modifications which shall be kept.
... and in fact there is no "compare by content" performed, if one file is newer.
A "compare by content" is only performed if "size + name + date" are the same.
Let me explain:
If "size" differs: obviously there are more bytes at one file
=> content differs for sure
=> no need to compare, files are different
If "name" differs: no file match
=> don't know what to compare
=> no chance to compare
If "date" differs: Newer date means latest file
=> no need to compare, latest file is to be kept always
With option "ignore date" you can override the date check in case the date has been change by mistake.
In this case a "compare by content" is performed if "size + name" are the same.
The newer file will be copied over the older by default.
This rule respects the fact that the newer file has the latest modifications which shall be kept.
... and in fact there is no "compare by content" performed, if one file is newer.
A "compare by content" is only performed if "size + name + date" are the same.
Let me explain:
If "size" differs: obviously there are more bytes at one file
=> content differs for sure
=> no need to compare, files are different
If "name" differs: no file match
=> don't know what to compare
=> no chance to compare
If "date" differs: Newer date means latest file
=> no need to compare, latest file is to be kept always
With option "ignore date" you can override the date check in case the date has been change by mistake.
In this case a "compare by content" is performed if "size + name" are the same.
#5767 Personal license
I'm working on a website. I have got hundrets of files. I chane files on 3 diferent computers. And I use compare option to copy files from one computer to another.
I want to TC compare files form me and show me witch are diferent and witch are newer. Then I manualy compare those files (right click and Compare Left & Right) to be sure that I'm not mistaked.
Usualy I have to compare about 10 files. But when I not check ignore date I've got that all files are diferent (hunderds of files) but trully only 10 is diferent. And this is VERY annoying.
Besides it is obvious to me that it is bug when two files are identical and TC shows that they are diferent. "By content" option should compare contents.
I want to TC compare files form me and show me witch are diferent and witch are newer. Then I manualy compare those files (right click and Compare Left & Right) to be sure that I'm not mistaked.
Usualy I have to compare about 10 files. But when I not check ignore date I've got that all files are diferent (hunderds of files) but trully only 10 is diferent. And this is VERY annoying.
Besides it is obvious to me that it is bug when two files are identical and TC shows that they are diferent. "By content" option should compare contents.
You said:
If "date" differs: Newer date means latest file
=> no need to compare, latest file is to be kept always
IT IS NOT TRUE. The files may have diferent dates but same content. If you check "by conntent" it should compare contents and not dates.
Second. Don't focus on options. Focus on tasks. The task is: compare directories, show identicaly files as =, and if not - show witch is newer. It is the simples task you can imagine, and TC cannot do this.
If "date" differs: Newer date means latest file
=> no need to compare, latest file is to be kept always
IT IS NOT TRUE. The files may have diferent dates but same content. If you check "by conntent" it should compare contents and not dates.
Second. Don't focus on options. Focus on tasks. The task is: compare directories, show identicaly files as =, and if not - show witch is newer. It is the simples task you can imagine, and TC cannot do this.
Just check both 'ignore dates' and 'by contents'.
BTW, you may start file comparison by double-clicking on file's line instead of opening context menu and choosing 'compare'.
BTW, if you compare with both options and then start sync, you may choose to replace only older, and TC will keep newer files.
BTW, you may start file comparison by double-clicking on file's line instead of opening context menu and choosing 'compare'.
If you want TC to compare contents and not dates, just check both options, as I said.Buczo wrote:If "date" differs: Newer date means latest file
=> no need to compare, latest file is to be kept always
IT IS NOT TRUE. The files may have diferent dates but same content. If you check "by conntent" it should compare contents and not dates.
Second. Don't focus on options. Focus on tasks. The task is: compare directories, show identicaly files as =, and if not - show witch is newer. It is the simples task you can imagine, and TC cannot do this.
BTW, if you compare with both options and then start sync, you may choose to replace only older, and TC will keep newer files.
Last edited by MVV on 2009-09-20, 18:59 UTC, edited 1 time in total.