http://qs321.pair.com?node_id=468140


in reply to Comparing duplicate pictures in different directories

Good one

I have something that does a similar job, however it works in a slightly different way. First of all the assumption is that the exact size of the image gives a quicker hint than the checksum so it keeps a hash that translates file sizes into a list of names and only looks at the contents when possible matches are detected.

This lets me specify a root directory, find candidates for cleaning up and interactively delete them using Tk.

To answer the other question I am running this under Windows (and I am not allowed to install a real environment) so diff is not available.

  • Comment on Re: Comparing duplicate pictures in different directories

Replies are listed 'Best First'.
Re^2: Comparing duplicate pictures in different directories
by elwarren (Priest) on Jun 21, 2005 at 18:10 UTC
    Sounds like everyone has, so I'll chip in how I did it in *my* version :-)

    I populate a hash with a filelist and sort based on size, so that I don't need to compare two files with the same filesize. But since I was comparing images from my webcam that were very small, there tends to be many files sized the same 87kb or whatever, so I still had do the hashing...

    Oh yeah, and the first thing to do after getting all the filesizes was to get rid of the zero byte or corrupt files...