Exporting photos?

I found an old post about using Script Editor to export smart albums from the photos app into a new folder, but keep getting an error message: permission denied. Can someone tell me exactly what changes I need to make to this script for it to work for me?


This is the script I found that seemed to work for people:


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


tell application "Photos"

repeat with i in albums

set tFolder to dest & (get name of i)

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

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

end repeat

end tell


on makeFolder(tPath)

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

end makeFolder

MacBook Pro (Retina, 15-inch, Mid 2015), iOS 9.3.3

Posted on Jul 20, 2016 8:39 PM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Exporting photos?

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