Apple Photos app – Find videos, copy elsewhere, then trash

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

Moderator: Mr_Noodle

Okay, so Apple's Photos.app has an annoying feature of bringing in all the *videos* we shoot with out iPhones & iPads. (at least it does when I'm using the iCloud Photo Library feature) Regardless, I don't want them all there, filling up my iCloud Drive space needlessly. So here's what I've tried to accomplish:

• FIND the videos
• MARK them with the color tag "green"
• COPY them to a central file server
• TRASH the originals

I've been able to find the videos inside the "Photos Library.photoslibrary" pretty easily. They live in ../Masters inside that bundle. And, using the "subfolder.hazelrules" provided here, it was easy to have the search be recursive through all the subdirectories of the "Masters" directory, Then I marked them all green, and copied them over to the file server – no sweat.

But, when I try to get all the movies in the subfolders again, and then move them to the Trash (or /tmp, or ~/test, etc.) nothing ever happens. FWIW, the "preview" option never works on this workflow; it always seems to get stuck on choosing a target folder dialog. If anyone could look at my Hazel rules for this below, and let me know what I did wrong, I'd really appreciate it.

Thanks!

- Hans Rupert

http://www.noir.net/z-tests/hazel/Photos_Masters_Videos.hazelrules.zip
r00p
 
Posts: 5
Joined: Sun Feb 21, 2016 1:26 pm

What do you mean that it gets stuck? Do you get the spinny mouse cursor? If so, then launch Activity Monitor, select System Preferences and do "Sample Process". Send/post the output of that.

In general, though, it's a bad idea to manipulate an app's files out from underneath it. It could screw up its internal accounting. That said, if you are going to do a copy then delete the original, just do a move instead. Same effect without the extra steps/problems.
Mr_Noodle
Site Admin
 
Posts: 11879
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:What do you mean that it gets stuck? Do you get the spinny mouse cursor? If so, then launch Activity Monitor, select System Preferences and do "Sample Process". Send/post the output of that.


No, not stuck as in "hung". I mean stuck just how I said: the preview button gets suck on the open dialogue, like this (an't select the Masters dir):
Image

Mr_Noodle wrote:In general, though, it's a bad idea to manipulate an app's files out from underneath it. It could screw up its internal accounting. That said, if you are going to do a copy then delete the original, just do a move instead. Same effect without the extra steps/problems.


I didn't think about that; Photos is using a database after all. Thank you for reminding me not to muck with it. FWIW, I did try the move to trash operation, but that didn't work any better.

There has got to be a way to automate Photos a bit more, doesn't there? At least Hazel did the heavy lifting already and let me copy ALL the videos out of the ../Masters dir & sub dirs recursively.

Thanks for the reply and any further insights.

- Rupert
r00p
 
Posts: 5
Joined: Sun Feb 21, 2016 1:26 pm

With the preview, you can't select the folder being monitored. That's because the rules don't operate on that folder; they operate on the items in it.

As for Photos, you'd probably need to write an AppleScript to cull the entries from the database.
Mr_Noodle
Site Admin
 
Posts: 11879
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron