Question Checking data integrity, which is better/more accurate - "Compare by content" option in Total Commander or SHA-3 512 in PS Hash ?

doomfan

Prominent
Jul 4, 2023
9
0
510
Hello. I have one question. I mean about comparing two or more files wchich in theory are identical/same if mean about their content/data to make sure that really they are identical/same. For example, I have image file *.iso* with size exactly 4 GB on internal disk and the second in theory the same image file *iso* with size too exactly 4 GB on pendrive. My question is, if I want to make sure that these two files are really identical/same if mean about their content/data (both these two files, this file from internal disk and this file from pendrive) what is better/more accurate/more precise if mean about it ? "Compare by contetnt" option in Total Commander or for example comparing of one file with second file by SHA-3 512 algoritm in PS Hash ?

Now - I guess that to make sure 100 percent that these two files are really identical/same if mean about their content/data I have to each of them to check by bit after bit method, am I right ? So, if these two files have size exactly 4 GB each of them it means that - 4 GB x 1024 MB = 4096 MB x 1024 KB = 4 194 304 KB x 1024 B = 4 294 967 296 B x 8 bits = 34 359 738 368 bits. So I have to in each of these two files to check in sequence each of these 34 359 738 368 bits if mean about are they really identical/same. I guess that each this bit have 0 or 1 value, because it's binary system, am I right still ? So if each of these 34 359 738 368 bits will be having identical/same value in each of these two files it means that these two files are really identical/same if mean about their content/data, am I right ?

Now let's move to comparing between "Compare by content" option in Total Commander and comparing one file with the second file by SHA-3 512 algoritm in PS Hash - does any of these options check these files by bit after bit method to make sure on 100 percent that these two files are really identical/same if mean about their content/data ? I ask about it because I would like in future to know what is better/more accurate/more precise for such tasks ? if I understand correctly result of such comparing of two files by bit after bit method where is checked/analyzed/compared each bit in each of these two files is a sequence of zeros and ones, am i right ?

If both methods wchich are "Compare by contetnt" option in Total Commander and comparing of one file with the second file by SHA-3 512 algoritm in PS Hash however don't check these two files by bit after bit method where is checked/analyzed/compared each bit in each of these two files is there any other software wchich can do these things ? If yes , I would please about names of such programs.

Thank You in advance for any tips and help.
 
Last edited:
Consider Powershell.

FYI:

https://medium.com/@claudestgermaine95/a-simple-file-integrity-monitor-with-powershell-240692945e4e

https://learn.microsoft.com/en-us/p...hell.utility/get-filehash?view=powershell-7.5

You can easily find other similar links.

Not something I have worked with (full disclosure).

However, depending on your full requirements and working environment, direct use of Powsershell "Get" cmdlets may prove more direct and provide more control overall.

Versus 3rd party tools. Many of which just use Microsoft's tools in the background and only add some "friendlier" or "fancier" end user interface. And maybe add in or include other things that you do not need, like, or want.....

The more direct control that you have then the more certainty you can have about the results. Based on your own data, tests, and comparisons.

Start simple, get it to work, compare actual results to expected results, and work from there.

Just my thoughts on the matter.
 
@Ralston18

Thanks for Your help. I was trying it yet - it works. Other people on other forums advised me too using "fc /b file1 file2" command in cmd.exe (command prompt). I was trying it too - it works too. They advised me too that "Compare by content..." option in Total Commander is sufficient to make sure in 100 percent that these two files are identical/same if mean about their content/data.

So now I discovered additionally that Total Commander has more advantages than I was thinking before. Earlier I was using Total Commander mainly to split files in to smaller parts by using "Split file..." option to later burn them on DVDs. It was many times very useful option for me when I was burning a lot of DVDs earlier.