Export Albums to Folders - Jacques Rioux's Script

Last modified: Jul 1, 2018 10:29 AM
11 34728 Last modified Jul 1, 2018 10:29 AM

The following script by Jacques Rioux will export selected albums as folders (with the same name as the albums) to a folder on your Desktop named PHOTOS-Albums. With his permissions I'm publishing it here. It was discussed in this ASC topic: export same albums from Photos.


Open Script Editor and paste the following into its window:

set dest to "/Users/HOME/Desktop/PHOTOS-Albums/" as POSIX file as text -- the destination folder (use a valid path)

tell application "Photos"

activate

set l to name of albums

set albNames to choose from list l with prompt "Select some albums" with multiple selections allowed


if albNames is not false then -- not cancelled

repeat with tName in albNames

set tFolder to dest & tName

my makeFolder(tFolder) -- create a folder named (the name of this album) in dest

export (get media items of album tName) to (tFolder as alias) without using originals

end repeat

end if

end tell

on makeFolder(tPath)

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

endmakeFolder


Change "HOME" to your short login user name or what your Home folder is named. You can also change the entire location to wherever you'd like, i.e. the Documents folder or an external hard drive.


Here's how to apply the script:


1 - launch the script, in the next window select the albums you want to export and click on the OK button:

User uploaded file


2 - on the Desktop a folder named PHOTOS-Albums will be created

User uploaded file

and inside will be folders representing the albums you selected to export.

User uploaded file


NOTE 1: The exported files include edited versions if edited and all metadata, i.e. keywords, titles, descriptions and locations.

NOTE 2: the script has been compiled and saved as an application which can be downloaded from this tutorial page: P01 - Applescripts from Photos’ User Tips Compiled as Applications

You will need to open the application with Script Editor and change "HOME" to your short login user name or what your Home folder is named.

User uploaded file

Comments

May 3, 2017 5:08 AM

The comments to the user tips can no longer be formatted in the Advanced editor - so I cannot post a modified version here right now. SO I posted a few suggested changes in another discussion - have a look at this discussion: Re: Re: How to export folder of multiple albums from Photos


I posted a modified version there with the following changes:

-- to include a sorted list of albums to pick from, as suggested by OT

-- a dialog to select the location of the default folder

-- a dialog to chose between exporting the originals or the modified versions

-- a prompt with the list of the exported album names, to see what has been exported

May 3, 2017 5:08 AM

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