Is it possible to compare files by hash code? If so how do I do this. I am attempting to locate duplicates. Simply calling the file.sashCode() generates a hash code but if a duplicate file is located the hash code if different, depending on name and location. Naturally you cannot have the exact same file name in the same directory. Is it a case of reading the files then converting that to a hash code then making the comparison?