Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There is in Windows file systems a pre computed hash for each file?

I want to search a file duplicate by its hash. For performance purposes I want to know if there is a stored hash/checksum for each file in NTFS/FAT file systems. If there is, I don't have to compute them all to search my file.

If there is, how to access it using .NET?

If it helps, it will be JPEG files. Do they have a checksum?

like image 250
Jader Dias Avatar asked Sep 29 '09 03:09

Jader Dias


2 Answers

There is no such thing.

like image 141
nobody Avatar answered Oct 05 '22 18:10

nobody


Windows does not store a hash for each file. As Jader Dias suggests, there are checksums for EXE's and DLL's but these are not the droids you are looking for.

Note that even if you had such a hash, it still does not guarantee uniqueness. If you found two files with the same hash (and size) you would still have to then compare contents to determine if the files were truly the same.

JPEG files may have some checksums or hashes, but you probably cannot count on them either.

like image 28
Foredecker Avatar answered Oct 05 '22 18:10

Foredecker