I'd like to export all of my favorited photos/videos on a weekly basis to a zip file or directory. Is there an apple script/automator workflow that can do this that I can schedule to run?
Thanks for your response, I've tried what you suggested but get this error (please note that automator is automatically changing the text "using originals true" to "with using originals":
If we open up the scripting dictionary for Photos and search for “favorite”, we see the following:
There is an album object available from the root Photos application that contains all of your favorited items. Perfect! Now we need to export them… dictionary, what do you have to say on the matter?
There is a command in Photos that exports specified media items to a filesystem location. That's exactly what we need! So, so far, we have this in our script window:
Obviously, you should replace [export location here] with the location you want to export to (via a
file
orPOSIX file
specifier). If you want to compress them into a zip file now, that should be pretty easy, too. In this case, since this functionality isn't provided by any preinstalled system application (that I am aware of), we can outsource the job to a command line utility calledzip
:And that's it! From there you can move the resulting zip file wherever you need using System Events or Finder or whatever you please, and delete the intermediate folder if you want. If this needs to run automatically on a regular basis, the easiest option by far is to embed the script in an Automator Calendar Alarm workflow, and attach it to a recurring calendar event. That's not too hard to find with a quick Google search, and this answer is long enough already.