Confirm if two folders are identical with Batch

Confirm if two folders are identical with Batch

Through the usage of hashing algorithms its possible to verify the integrity of files, which is very handy to compare if a single file was changed, or confirm if two folders synchronized correctly.

I choose SHA-256 hashing available in 7-Zip through command line, to calculate the hash and compare the contents of a source and destination file or folder pair set manually within the script. This can be handy to confirm that applications like FreeFileSync copied all the files correctly.

The result is either a green or red window with both the calculated hashes.

To use the script correctly make sure 7-Zip is installed, and the path to 7z.exe is manually updated within it, otherwise the script won’t run. The whole batch files is available below.