Trash Duplicate file During Apple Photos Import

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

Moderator: Mr_Noodle

I recently needed a to use a photo on my computer that I had taken on my iPhone. It was in the iPhone Photos app but had not synced in iCloud yet, so I can not access it from there on my iMac.

I used Airdrop to quickly move the photo to my iMac. This worked but it put the copy of the file into the Downloads folder that Hazel watches for new photos and import them into the Photos app.

The results was that every time Hazel ran, it attempted to import the file into Photos , and the photo was rejected as a duplicate file. There must have been dozens or even hundred of duplicate file prompts from Photo app when I logged into my computer the next day.

I have "trash duplicate files" checked in Hazel, and the rule itself moves the into trash after it has been imported into Photos. However, the file stayed in the watched folder, which caused the "infinite loop" of duplicate file messages.

I checked Photos settings and there isnt' a default action that I can set for handling duplicate files. So I'll try to solve it in Hazel.

Has anyone solved this? I searched these forums and Google for an answer and did not find one.
sourcecodemage
 
Posts: 17
Joined: Sat Nov 07, 2015 11:42 pm
Location: Denver,co

Not sure how you have the rule set up but try adding "Date added is after date last matched" so that it only happens when the file is added.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Not sure how you have the rule set up but try adding "Date added is after date last matched" so that it only happens when the file is added.

there are multiple ways the same photo can be added to my Photos library, it may be added by computer A but also gets into a watched folder on computer B

computer A imports it
the computer B’s hazel sees it and tries to import it
the import fails

what i would like to happen is for Hazel to take an action on failure . for example, the action could be to move the file into a “failed import “ folder that i can review at my leisure.
sourcecodemage
 
Posts: 17
Joined: Sat Nov 07, 2015 11:42 pm
Location: Denver,co

No way to do that now as Hazel always does re-tries until it succeeds. You'll need to write a script to try and import yourself and do something else on failure.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:No way to do that now as Hazel always does re-tries until it succeeds. You'll need to write a script to try and import yourself and do something else on failure.

Thanks, I'll change my workflow to try and prevent this. I have a number of file types that I want imported automatically, but there can be more than one way in.
For example , Hazel manages my downloads folder, but I discovered that Apple Airdrop delivers files there are well.

So if I take a picture on my iPhone, and I want to use before it Photos syncs it with iCloud.
I might use Airdrop to "drop" the photo onto my iMac to use immediately.
In the meantime, the Photos syncs with iCloud and the photo is there.
Then Hazel sees the Airdropped photo and tries to import it.
It does this forever until someone takes action to stop it.
sourcecodemage
 
Posts: 17
Joined: Sat Nov 07, 2015 11:42 pm
Location: Denver,co


Return to Support