Jump to content

How many files are the same


The Little Guy

Recommended Posts

lets say I own a file, and you own a file,  both these files are the exact same file, the only difference is the filename. So lets say we both have The Gimp 2.6 but one is named TG2.6.exe and the other is named the_Gimp-2.6.exe. What would be the best way to count the files that are the same even if they have a different file name? Another example would be:

 

I have a file called me.jpg and someone else has a file me.jpg but they are two completely different pictures. What would I do to tell that?

Link to comment
https://forums.phpfreaks.com/topic/260275-how-many-files-are-the-same/
Share on other sites

filesize

 

md5_file

 

Files that are the same size, might be the same. Files that are not the same size cannot be the same.

 

Files that have the same md5 hash/checksum, are likely to be the same. Files that don't have the same md5 hash cannot be the same.

 

If files are the same size and have the same md5 hash, you would need to compare byte-byte to determine if they are the same or not.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.