Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Comparing duplicate pictures in different directories

by hawtin (Prior)
on Jun 19, 2005 at 14:46 UTC ( [id://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

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...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-20 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found