upload to Photos, then delete?

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

Moderator: Mr_Noodle

upload to Photos, then delete? Sun Dec 09, 2018 1:54 pm • by Rae
I'm sorry if this has been asked before -- I've done a search and haven't found anything that looks like what I'm trying to do. I'm trying to do more complex things with Hazel after years of just having her do very simple tasks, so a solution to this issue will help me unlock other similar ones.

So I frequently AirDrop pictures from my phone to my computer. They land in my Downloads folder. I would like Hazel to upload those pictures to my Photos library and then delete the photos from my Downloads folder. I've got the first part working to a point, but I don't see a way to make Hazel do the upload first and then delete files from my Downloads folder other than creating a second rule and playing with the dates.

Currently, I have if kind is images + date added is before today, then import into Photos library. This works great -- soon as I log on in the morning, Hazel cleans up the previous day's pictures. But, again, the original files are still in the Downloads folder and if I don't manually get rid of them, Hazel will just keep trying to upload those pictures.

Any help would be greatly appreciated. Thank you. :)
Rae
 
Posts: 3
Joined: Sun Dec 09, 2018 1:41 pm

Re: upload to Photos, then delete? Mon Dec 10, 2018 12:12 pm • by Mr_Noodle
I believe you can do a Move to trash right after Import into Photos in the same rule. Is this not working?
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: upload to Photos, then delete? Mon Dec 10, 2018 12:18 pm • by Rae
This is how I have it set up right now: http://prntscr.com/lt5j7o. Like this, Hazel tries to both upload and delete the files at the same time rather than uploading, then deleting.
Rae
 
Posts: 3
Joined: Sun Dec 09, 2018 1:41 pm

Re: upload to Photos, then delete? Tue Dec 11, 2018 11:41 am • by Mr_Noodle
You say uploading in this case, can you elaborate? The Photos library should be local unless you have some odd setup I'm unfamiliar with.

You can try splitting it up into separate rules. First off, in your original rules, it's better to do "Date added is after date last matched" to catch any new files. For the trash rule, you can do "Date added is not in the last X minutes" to throw the file away after some time has passed.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: upload to Photos, then delete? Wed Dec 12, 2018 7:20 pm • by Rae
Good catch -- I keep saying upload instead of import. :-/

I'm going to try your suggestion to create two separate rules for my Downloads folder.

Is there a way to get Hazel to close Photos after it imports the photos to the app?

Thank you!
Rae
 
Posts: 3
Joined: Sun Dec 09, 2018 1:41 pm

Re: upload to Photos, then delete? Thu Dec 13, 2018 11:24 am • by Mr_Noodle
You can use an AppleScript to close it. The problem is how does it know it's done? Hazel imports one file at a time and from Hazel's POV, it's not clear whether or not there will be more files to be imported.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support