How can I check/compare a files checksum?

Support for Android version of Total Commander

Moderators: sheep, Hacker, Stefan2, white

Post Reply
cgar
Junior Member
Junior Member
Posts: 4
Joined: 2017-04-30, 21:38 UTC

How can I check/compare a files checksum?

Post by *cgar » 2017-05-01, 15:16 UTC

I've been using TC for a while now on my zenfone 2 since ES went way downhill. Really happy with it. Simply the best by far.

However, I can't find an option to check a file's checksum against one in the clipboard.

After some experimentation I have managed to create a new button that calculates an md5 and pops it up in a toast using:
Command: sh
Paramaters: md5sum "%N"

But it only displays it for a few seconds, comparison has to be made by eye and I can't copy it.

Have I missed it or is there no checksum functionality built in yet?

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38451
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2017-05-04, 12:57 UTC

You can put a * in front of the parameters to show the results in a dialog box instead of a popup window. It also has a button to copy the text to the clipboard.
Author of Total Commander
http://www.ghisler.com

cgar
Junior Member
Junior Member
Posts: 4
Joined: 2017-04-30, 21:38 UTC

Post by *cgar » 2017-05-04, 17:41 UTC

ghisler(Author) wrote:You can put a * in front of the parameters to show the results in a dialog box […]
Ah that's fantastic thank you. So much better than eyeballing it lol.

Is there any way to compare a checksum? Is there a variable that dumps clipboard content? Then with the parameter of a button I could do something like:
md5sum -c <<< "%clip %N"

Edit: Woops sorry, too used to bash. For sh it would be:
echo "%clip %N" | md5sum -c -

Are there any plans for checksumming to be added fully? Like an option in the long press menu of a file opening a window with various hash algorithms and a paste box or file selector to input a hash or hashes to be compared?

Gotta say though, it's a great testament that because TC is so good even something that isn't built in can be so easily implimented by the user. Well done :-)

User avatar
DrShark
Power Member
Power Member
Posts: 1403
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262

Post by *DrShark » 2017-08-13, 13:26 UTC

For my device, which doesn't have md5sum command, following button to show md5 works:
Function type:
Send Shell command
Command:
sh
Parameters:
*md5 "%N"
Android 4.3.1 no root, kernel 08.09.2016; Vista Home Premium SP2 rus 32 bit
TC #149847 Personal licence

Cuz we're all in this together, We're here to make it right

lbug
Junior Member
Junior Member
Posts: 2
Joined: 2015-10-08, 10:40 UTC

Re: How can I check/compare a files checksum?

Post by *lbug » 2018-11-13, 12:55 UTC

Hi,
I would REALLY like to see a full implementation of the checksum functionality - at least for MD5-sums. I.e., creating *.md5-files for directory contents or single files - AND checking these afterwards; like the Windows application does.

In many occasions I already needed this functionality but was never able to create / check checksum files. So I always had to create them on the Windows-PC, copy the whole data directory to the phone and hope that all is going right until I copy the files off the phone again, being able the check the sums on the receiving Windows machine. - That's no way to go with such untrustworthy media like SD cards. Until now I got lucky with my own phone but others weren't.

I wasn't happy with this for some time now. - But right now I'm in a really uneasy situation. My phone's internal storage got so filled up that it can't be connected to PCs anymore!? I even restarted the device several times, all seems to work fine (besides the "low storage" warning) but no Windows-PC is willing to connect it via USB anymore.
Normally this shouldn't be a problem, because I have enough free space on the installed SD card to move some stuff there. Quickly I found a directory with videos and photos. It already contains a MD5 checksum file which was created on Windows before. . . . And still, I don't have a means to check if this big directory's content was copied successfully before I delete the original.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38451
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How can I check/compare a files checksum?

Post by *ghisler(Author) » 2018-11-15, 15:42 UTC

There are already some apps which do this, e.g. this one:
https://play.google.com/store/apps/details?id=com.fab.md5
Author of Total Commander
http://www.ghisler.com

lbug
Junior Member
Junior Member
Posts: 2
Joined: 2015-10-08, 10:40 UTC

Re: How can I check/compare a files checksum?

Post by *lbug » 2018-11-23, 16:14 UTC

Sadly, this app does not fulfil any of the requirements.
It does not even support .md5-files with multiple lines!?
How should it support checksums of whole directory structures like the Windows-version of TotalCommander does?
(It also does not support to write .md5-files but I see that this is not the topic here.)

For me, there was no other solution than creating a big archive file of the directory I had to move. I was not awaiting any "attacks", so the CRC-32-checksum of the archive had to suffice. So I could at least check something before deleting the original.
I would still love to see the same functionality as with the Windows-version since I am copying lots of stuff between PC and Smartphone, in both directions.

Suncatcher
Junior Member
Junior Member
Posts: 18
Joined: 2013-12-30, 10:59 UTC

Re: How can I check/compare a files checksum?

Post by *Suncatcher » 2019-06-16, 07:03 UTC

And what about comparing files? I want compare two different files via checksum not against clipboard but between themselves? Can I do this just by right-click like I can do this in TC Desktop?

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38451
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How can I check/compare a files checksum?

Post by *ghisler(Author) » 2019-06-17, 13:27 UTC

If the checksum is in the clipboard, you can use menu Files - Verify checksums to verify the checksum of the file under the cursor with the checksum from the clipboard.
Author of Total Commander
http://www.ghisler.com

Post Reply