6

I'm looking for a command line tool for windows that will go over a directory tree (recursively) and output a list of all the files in there, and a checksum for each file (can be CRC, MD5, whatever).

Esentially, what I want is to compare 2 big directory trees in 2 machines. I'm planning to take the outputs of running this tool in both, and diffing them to make sure they're identical.

I appreciate any ideas.

4 Answers4

6

hashutils and HashCheck are the best packages I've found on Windows so far. Both tools are open source from the same author, but HashCheck is a shell extension and hashutils is a set of CLI tools. In my testing, they're significantly faster than the ported unxutils versions. (Despite the expectation that they'd be I/O bound.)

I also think that these tools are better than the often-mentioned HashTab, and if I could get to the Ars OpenForum, I'd link a post I wrote up with my justification.

afrazier
  • 23,505
1

Easy in the *nix world. Just grab the tools and then make a pipeline of find, sort, and md5sum.

find . -type f -print0 | sort -z | xargs -0 md5sum
0

Total Commander (File -> Calculate checksums). But beware! If all filenames belong to your locale codepage, encoding will be this codepage, otherwise UTF8.

-1

Disclaimer: I am the author of this library.

An alternative is pyFileFixity, a self-contained Python 2 library, containing the tool "rfigc.py". It works on Windows (since my machine runs Windows 7 x64) but it should work on all platforms, and the databases generated on one OS can be used on other OSes (because paths are relative and always uniformized in UNIX style).

gaborous
  • 2,102