idrassi / DirHash

Windows command line utility to compute hash of directories and files
BSD 3-Clause "New" or "Revised" License
111 stars 11 forks source link

Changes to filenames and directory names are not detected #21

Closed icanhazpython closed 3 years ago

icanhazpython commented 3 years ago

Imagine I have two folders with the following structure:

Now I go and run the following:

> DirHash.exe .\xyz sha1 -quiet -nowait
97CE6BED8F31135D64A74675B6E3F1576863EC6D

> DirHash.exe .\efg sha1 -quiet -nowait
97CE6BED8F31135D64A74675B6E3F1576863EC6D

The different directory names produce the same hash. Is there an option to actually detect differences to directory names?

idrassi commented 3 years ago

@icanhazpython Yes, there is an option to include name in the hash computation. For this, use the switch -hashnames as documented in the Readme. Without this option, the hash is done on the content only.