I’d like to write a script that traverses a file tree, calculates a hash for each file, and inserts the hash into an SQL table together with the file path, such that I can then query and search for files that are identical.
What would be the recommended hash function or command like tool to create hashes that are extremely unlikely to be identical for different files?
Thanks
B
I’d like to write a script that traverses a file tree, calculates a hash
Share
you can use md5 hash or sha1
if you working in Windows change slashes to backslashes.