Compare by contents using MD5 (or others)
Moderators: Hacker, petermad, Stefan2, white
Compare by contents using MD5 (or others)
Hi,
I would really welcome the possibility to compare two files using a checksum, just to know if they are equal or not. This is because I often compare two DVD ISO images (4,7 GB) and using Files - Compare by content it takes forever, so I usually resort to creating an MD5 checksum for one, editing the .md5 file to change the filename and verifying the other file. I would suggest an internal command like cm_CompareByMD5 which would just tell me if files are identical or different (the strings are already there).
Thanks for consideration.
Roman
I would really welcome the possibility to compare two files using a checksum, just to know if they are equal or not. This is because I often compare two DVD ISO images (4,7 GB) and using Files - Compare by content it takes forever, so I usually resort to creating an MD5 checksum for one, editing the .md5 file to change the filename and verifying the other file. I would suggest an internal command like cm_CompareByMD5 which would just tell me if files are identical or different (the strings are already there).
Thanks for consideration.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- Samuel
- Power Member
- Posts: 1930
- Joined: 2003-08-29, 15:44 UTC
- Location: Germany, Brandenburg an der Havel
- Contact:
Do it yourself. 
With the new Content plugins with compare function (for sync).
Edit:

With the new Content plugins with compare function (for sync).
Edit:
Overread that.cm_CompareByMD5
Also external compare tool (or just simple batch or script that will call MD5 calculator for both files and compare results) may help.
E.g.:
For tool that may be downloaded here.
Button parameters may be any needed, e.g.:
This will compare two selected files from active panel, or selected one in active with selected one in inactive - i.e. as for internal TC compare tool.
E.g.:
Code: Select all
@echo off
if -%2==- goto exit
if %1==%2 goto exit
set md5~1="%temp%\md5~1.txt"
set md5~2="%temp%\md5~2.txt"
echo File1: %1
echo File2: %2
%0\..\md5.exe -n %1>%md5~1%
%0\..\md5.exe -n %2>%md5~2%
echo.
echo MD5 checksums for files:
type %md5~1%
type %md5~2%
echo.
fc %md5~1% %md5~2%>nul
if errorlevel 1 echo [X] Files have different contents!
if not errorlevel 1 echo [ ] Files have same MD5 checksums.
pause>nul
del %md5~1%
del %md5~2%
:exit
cls
Button parameters may be any needed, e.g.:
Code: Select all
%P%S2 %T%R1
Last edited by MVV on 2010-05-14, 07:29 UTC, edited 6 times in total.
It was requested before here
MVV,
Thank you for the workaround. I'd still love to see it implemented internally.
ts4242,
Indeed, but I do not need the compare function to be started to show me the differences. For my needs it is only necessary to find out if files are equal or not.
Roman
Thank you for the workaround. I'd still love to see it implemented internally.

ts4242,
Indeed, but I do not need the compare function to be started to show me the differences. For my needs it is only necessary to find out if files are equal or not.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
I think that internally should be implemented features that can't be implemented externally. If feature may be easilly implemented by little external tool, why not to use it?Hacker wrote:I'd still love to see it implemented internally.
BTW using some script (e.g. WHS) you may show standard GUI message instead of console window - exactly like internal solution!
MVV,
Anyways.
Roman
Ah, the age old debate. Because it might be useful to others as well. Because I do not want to fiddle around with dozens of checksum tools to find the fastest one. Because I do not want console windows to pop up or have the need to hide them programatically. Because I want to see the progress in the taskbar. Because it is something which should be very easy to implement, perhaps faster than me programming a workaround.I think that internally should be implemented features that can't be implemented externally.
Anyways.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Quick is nice !
2Hacker
Hi Roman !
• I support your proposal as a built-in feature.
- I guess that a quick comparison using checksums should be very convenient in many cases, I would certainly use it often !
KR
Claude
Clo

• I support your proposal as a built-in feature.
- I guess that a quick comparison using checksums should be very convenient in many cases, I would certainly use it often !

Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
Support,
Should allow for any of the CheckSum's that TC can already use: CRC or MD5. Granted CRC is not as good as MD5 -- sometimes it is good enough.
Could also use a generated MD5 | CRC file list (text file)
Any file's whose date is OLDER than the generated MD5|CRC text file would consider it's pregenerated value in the text file as valid.
I.E if you generate an MD5/CRC file list "Now". and all your files are older than "Now", then all the Checksums in the text file would be considered current/valid.
Which leads to a further function, the Compare could use a recalculate checksum first -- but only need to recalculate the files that have a newer date than the checksum file itself.
Should allow for any of the CheckSum's that TC can already use: CRC or MD5. Granted CRC is not as good as MD5 -- sometimes it is good enough.
Could also use a generated MD5 | CRC file list (text file)
Any file's whose date is OLDER than the generated MD5|CRC text file would consider it's pregenerated value in the text file as valid.
I.E if you generate an MD5/CRC file list "Now". and all your files are older than "Now", then all the Checksums in the text file would be considered current/valid.
Which leads to a further function, the Compare could use a recalculate checksum first -- but only need to recalculate the files that have a newer date than the checksum file itself.
Re: Compare by contents using MD5 (or others)
I guess I didn't get the entire requestHacker wrote:Hi,
I would really welcome the possibility to compare two files using a checksum, just to know if they are equal or not. This is because I often compare two DVD ISO images (4,7 GB) and using Files - Compare by content it takes forever, so I usually resort to creating an MD5 checksum for one, editing the .md5 file to change the filename and verifying the other file. I would suggest an internal command like cm_CompareByMD5 which would just tell me if files are identical or different (the strings are already there).

Ok, this is not a solution if you need checksums for archiving purposes. Sorry.