Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Comparing duplicate pictures in different directories

by hawtin (Prior)
on Jun 19, 2005 at 14:46 UTC ( #468140=note: print w/ replies, xml ) Need Help??


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
Re^2: Comparing duplicate pictures in different directories
by elwarren (Curate) 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...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://468140]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (18)
As of 2014-07-30 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (236 votes), past polls