Compare by Contents finds 0 differences
Moderators: Stefan2, Hacker, petermad
-
alphonse68
- Junior Member

- Posts: 39
- Joined: 2011-09-26, 13:53 UTC
Compare by Contents finds 0 differences
Hello.
I noticed that when comparing two text files (*.bas exported from Excel VBA), the Compare Contents tool will open files that have 0 differences in the comparison window. This behaviour had happened very infrequently, such that I always supposed there must have been something to do with one of the files. However, in 11.57aRC1, I just compared 22 pairs of these exported files and 10 0-difference comparisons were opened. That does not rule out something in the files, therefore, my questions: Has this happened to anyone else? Does anyone one know of a reason for this?
Cheers
I noticed that when comparing two text files (*.bas exported from Excel VBA), the Compare Contents tool will open files that have 0 differences in the comparison window. This behaviour had happened very infrequently, such that I always supposed there must have been something to do with one of the files. However, in 11.57aRC1, I just compared 22 pairs of these exported files and 10 0-difference comparisons were opened. That does not rule out something in the files, therefore, my questions: Has this happened to anyone else? Does anyone one know of a reason for this?
Cheers
Re: Compare by Contents finds 0 differences
This is a common behaviour if you e.g. compare files with difference in letters case or whitespaces only and proper option for comparison checked/unchecked. Use binary comparison for check your case.
Re: Compare by Contents finds 0 differences
There can also be differences in line-breaks, i.e. CRLF vs. LF. Binary comparison will help in this case, too.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Compare by Contents finds 0 differences
And in encodings, e.g., ANSI and UTF-16 LE files may have absolutely identical human-readable contents, while their underlying byte structures share almost nothing in common...
#278521 User License
Total Commander [always the latest version, including beta] x86/x64 on Win10 x64/Windows 11/Android 17
Total Commander [always the latest version, including beta] x86/x64 on Win10 x64/Windows 11/Android 17
-
alphonse68
- Junior Member

- Posts: 39
- Joined: 2011-09-26, 13:53 UTC
Re: Compare by Contents finds 0 differences
OK. Thank you all for your input.
I had no idea letter case would trigger but not show when different.
I shall keep in mind to do binary compare.
This time it was letter case, but I also learned to also be mindful of possible CRs, LFs, and encoding.
Once again, thank you to all three.
Cheers!!
I had no idea letter case would trigger but not show when different.
I shall keep in mind to do binary compare.
This time it was letter case, but I also learned to also be mindful of possible CRs, LFs, and encoding.
Once again, thank you to all three.
Cheers!!
Re: Compare by Contents finds 0 differences
Well, compare by content can be case-sensitive if the option "Case sensitive" is checked.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Compare by Contents finds 0 differences
I think something is NOT right.
When comparing dirs using green arrow icon it correctly identifies files with SAME names (however different size - clearly different content).
So I switch to red unequal icon - zero results. So swithced to Red unequal icon with checked content - zero results (clearly wrong as there are files earlier identified as having same name but with different sizes which clearly indicates different content).
I do not think this is correct neither expected behaviour.
When comparing dirs using green arrow icon it correctly identifies files with SAME names (however different size - clearly different content).
So I switch to red unequal icon - zero results. So swithced to Red unequal icon with checked content - zero results (clearly wrong as there are files earlier identified as having same name but with different sizes which clearly indicates different content).
I do not think this is correct neither expected behaviour.
Re: Compare by Contents finds 0 differences
So I thought it over again...
The unequal icon check apparently for different naming, so it won't show these files with the same name but different content.
I probably should use green arrow (filter same names first) with combination of comparing content to filter out only files with... different content. But it doesn't work. I have not found any filter combination for this scenario (find files with same names but different content).
The unequal icon check apparently for different naming, so it won't show these files with the same name but different content.
I probably should use green arrow (filter same names first) with combination of comparing content to filter out only files with... different content. But it doesn't work. I have not found any filter combination for this scenario (find files with same names but different content).
Re: Compare by Contents finds 0 differences
2BartS
This topic is about "Compare by Content" NOT about "Synchronize directories"
Apart from that "Synchronize directories" always ONLY compare files with the same name. If they have the same size they are considered equal if the date is also the same unless you check "by content". . If the date is different but the content the same it will be marked either with green arrow or blue arrow - green if the file on the left side is newer, blue if the file on the right side is newer. If two files have the same content but different date and "ignore date" is checked, then the files are marked as equal.
This topic is about "Compare by Content" NOT about "Synchronize directories"
Apart from that "Synchronize directories" always ONLY compare files with the same name. If they have the same size they are considered equal if the date is also the same unless you check "by content". . If the date is different but the content the same it will be marked either with green arrow or blue arrow - green if the file on the left side is newer, blue if the file on the right side is newer. If two files have the same content but different date and "ignore date" is checked, then the files are marked as equal.
License #524 1994
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish TC Translator
TC 11.58 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1416b
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
