How are duplicate files detected?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

How are duplicate files detected? Fri Oct 17, 2014 11:17 am • by kristin
Hello.

Just looking to modify one of my scripts that auto handles the organization of imported photos. Since I don't want to loose any photos via an automated system, I'm just looking for some more details on how Hazel detects duplicate files. Is it a simple filename comparison, or is it more complex than that (i.e., file analysis)?

Thanks,
Kristin.
kristin
 
Posts: 23
Joined: Tue Apr 10, 2012 12:34 pm

Re: How are duplicate files detected? Fri Oct 17, 2014 12:07 pm • by Mr_Noodle
It's geared towards duplicates created by downloading the same file twice or copying the file into the same folder. It only applies to files in the same folder which follow a certain naming scheme, usually involving add a number at the end. Hazel will compare the actual contents so it will never throw away duplicates unless they have the exact same contents.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: How are duplicate files detected? Fri Oct 17, 2014 12:42 pm • by kristin
OK, let me expand a little.

I'm using this rule to organize iPhone photo imports (moving videos into a Master Videos directory, photos into a Master Photos directory, which then gets backed up each night, locally and offsite). The rule also auto-organizes the files based on YYYY-MM directories. This is all working great.

So, scenario #1 (typical): I forget to delete the archived photos from my iPhone, shoot more photos, then on the import, all the photos I already imported previously are imported again, along with the new photos. Since I don't need duplicates, I'd like Hazel to "ignore" them (or "throw them away"—though, ideally, I'd like them to go into a "Safety Net" folder I've created, but that's another thread...). This is all good.

But, scenario #2 (pretty random, but I'm paranoid of losing photos): A completely different photo (or even a modified version of the photo) is imported with the same name. While the contents of the file are different, the name is the same (say, the photo was retouched)—so, this is where I'm not sure what would happen. Since the files have the same name, would they be considered "duplicates" (thus one of them is "thrown away"), or would Hazel understand that, even though they have the same name, they're not actually duplicates and thus re-name (appending "-1" or whatever) to the second file upon import? I realize this is being paranoid, but just like to get everything sorted before automating a process like this).

Thanks again,
Kristin.
kristin
 
Posts: 23
Joined: Tue Apr 10, 2012 12:34 pm

Re: How are duplicate files detected? Fri Oct 17, 2014 4:40 pm • by Mr_Noodle
In the options, "file exists" means another file with the same name. "duplicate" means a file with the same contents. If you want to play it safe, I would suggest always having it rename the file (which ends up adding a number). You can use the "Throw away duplicate files" option on the folder itself to weed out actual duplicates after the fact. I think that should give you some semblance of what you want but you'll still have to tweak it.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: How are duplicate files detected? Fri Oct 17, 2014 5:15 pm • by kristin
Thanks!
k.
kristin
 
Posts: 23
Joined: Tue Apr 10, 2012 12:34 pm

Re: How are duplicate files detected? Sun Feb 22, 2015 3:18 am • by pbnj
Hi,

I am having this issue. I am using "IMAGE CAPTURE" for importing images from my iphone into a laptop folder and hazel moves MOVIES & PNGs to subfolders with those names.

If I don't delete the images/movies from my iPhone and then reimport them to my laptop, hazel rule moves the MOVIES/PNG to the correspoinding directories and duplicates are renamed with -1, -2, -3 etc. added to the end of the filename.

I have "Throw away" duplicate files.

How can I prevent hazel from copying the duplicate files to the directories or deleting them when it detects they are duplicates.

Thanks.
pbnj
 
Posts: 4
Joined: Mon Feb 03, 2014 6:36 pm

Re: How are duplicate files detected? Mon Feb 23, 2015 12:11 pm • by Mr_Noodle
Already answered in another thread. Please do not post the same thing multiple times.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support