C#, Fastest (Best?) Method of Identifying Duplicate Files in an Array of Directories

Posted by Nate Greenwood on Stack Overflow See other posts from Stack Overflow or by Nate Greenwood
Published on 2010-05-11T22:46:37Z Indexed on 2010/05/11 22:54 UTC
Read the original article Hit count: 159

Filed under:
|
|

I want to recurse several directories and find duplicate files between the n number of directories.

My knee-jerk idea at this is to have a global hashtable or some other data structure to hold each file I find; then check each subsequent file to determine if it's in the "master" list of files. Obviously, I don't think this would be very efficient and the "there's got to be a better way!" keeps ringing in my brain.

Any advice on a better way to handle this situation would be appreciated.

© Stack Overflow or respective owner

Related posts about c#

Related posts about file