Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

export same albums from Photos

Hi


How can I export my library or part of my library from Photos with same album structure created?


For example, I have in Photos albums A, B, C, D, E etc


I want to export the pictures in a folders structure in OSX/finder as albums in Photos

So, in

-folder A with pictures in album A

- Folder B with pictures in album B


And so on


Thanks

Posted on May 11, 2015 7:18 AM

Reply
63 replies

May 2, 2016 7:43 AM in response to leahcimp

Hi,

leahcimp wrote:


Jacques,


Is it possible to sort the list of albums? I tried using the simple_sort() subroutine (http://www.macosxautomation.com/applescript/sbrt/sbrt-05.html) but it fails.


Here is the basic script that shows how to use the sorting routine.


-- the Photo's script

-- script's lines

set l to name of albums

set l to my simple_sort(l) -- call the sorting routine, this put the output of the routine into the 'l' variable

-- script's lines

-- end of the Photo's script


on makeFolder(tPath)

do shell script "mkdir -p " & quoted form of POSIX path of tPath

end makeFolder

on simple_sort(my_list) -- The sorting routine, I do not include all the lines

-- you must copy/paste it from http://www.macosxautomation.com/applescript/sbrt/sbrt-05.html

return the sorted_list

end simple_sort

May 30, 2016 5:50 PM in response to socraties

Hi,


socraties wrote:


This is exactly what I am looking for. Thank you! I do run into a problem where the script errors out after about 3200 photos and the PHOTOS-Albums folder on my desktop reaches about 14GB. Here's a screen shot from Automator. Any ideas what might be going wrong?


The default time out is 2 minutes, an error occurs when a command takes more than 120 seconds

You have a lots of photos in an album, so it take more than two minutes to export it on the disk.


To prevent this:

You can increase the time, like this (ten minutes in this example):

--------

with timeout of 600 seconds -- error when the export command takes more than 10 minutes

export (get media items of ........

end timeout

-------


Or, to avoid the time out error, use this:

------

with timeout of 0 seconds -- avoid the time out error

export (get media items of ........

end timeout

------

May 31, 2016 4:44 PM in response to socraties

You are confusing the file date with the photos date - the photo date is included in the Photo in the EXIF/IPTC data - if you open the photo in a photo program like Preview you will see the photo date - if you look at it in the finder (a file manager) you will see the file date - like the postmark date on an envelope is the date the letter was mailed and the date on the letter in the envelope is the date the letter was written - two totally different things


LN

Aug 20, 2016 7:02 AM in response to isra_BCN

I was excited to find the script for exporting Photo albums, but running into two surprises:


1. My Script Editor is in iCloud, not on Desktop (though i don't know if it matters),


2. I copied the script into Script Editor, substituting the name of my home folder for "home."


When I attempt to save it, I get


SYNTAX EDITOR

A “"” can’t go after this identifier.


Any advice appreciated! Thanks.

Sep 22, 2016 2:24 AM in response to isra_BCN

Hello,


Thank you so much for your script 🙂

Is it working with Sierra?

My final goal is to use your script to perform a sync from my Photos Library on my Mac to my NAS on my local network. So I'll need to modify your script to check before copying the file if it exists already or not, and if so, if it has been modified since the last sync or not. Depending on that, the file will be copied or not.

The main issue that I see is how can I remove the files on my NAS which have been removed from my Photos Library !? Maybe with a second script which could compare both structures and remove the files on the NAS which are not in the Photos Library.


Any idea of how I could modify the script to have this working?

Thank you very much.


Best regards,

Damien

export same albums from Photos

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.