Jump to content

Recommended Posts

Posted (edited)

Just a little project of mine, that I thought I would share.

MD5compare.png.d6ac7b83dd4fc1e6bdf861a1bceb349d.png

Basically, I have a scenario sometimes, where two files have the same size, but have somewhat different file names, but I suspect them of being the same file, one renamed.

An example of that, would be something like a pdf file in a zip file, that is a game manual, and the game got updated to v1.1, and that zip file was renamed to suit, and is the same file size, but could possibly be different. I have that happen a lot with downloads from the ZOOM Platform game website.

So rather than relocating a copy to another folder (as I have so often done), and renaming it to match the other file, and then testing with something like TeraCopy, I eventually decided to build my own simple MD5 checker that compares the MD5 value of two files, which it has calculated.

You populate the source fields by drag & drop, preferably to the GREEN and BLUE 'Source' labels.

Version one of the program was a simple affair, but then I decided to play around with progress bars, because I'd had it mind for a while, to develop my own for the Hash Encrypt function, which I use in several of my programs. The speed of incrementation of the progress bar, is tied to the previous calculation (file size & time), so at best is only approximate, so not much more than a guide, but hey, something is better than nothing.

The first thing I needed to do, was create a separate command-line based EXE file (MD5checker.exe) for doing the checksums. It records the file size and time taken and checksum values in a 'Setting.ini' file, shared with the calling program (MD5 Compare.exe). That calling program uses the AdLib commands, to check on the progress of the hashing, while waiting for it to complete for each file being compared.

MD5compare2.png.86ff5bbb9c22a221aeb0f989cb46b45c.png

MD5 Compare v1-1.zip

Enjoy!

P.S. If you want to use an algorithm other than the MD5 one, be my guest. I know we can use better ones, but as I sometimes use my program for other scenarios, that involve a recorded MD5 value, I've just stuck to MD5, which is reliable enough.

 

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...