MacOS – How to convert the Photos library to actual files and folders with no quality loss

finderiphotomacosphotos.app

I spent a lot of time organizing my iPhoto Library with Events. Now, my events have been converted to "Folders" in the new Apple Photos system. I moved them up a level (making them Albums), and I've been using this kind of structure to keep my photos stored in different sets for several months. Now, I'd like to convert my Photo Library to a file-and-folder structure, so that I can move to a different program, such as ShotWell for Ubuntu. Unfortunately, it seems that they have been "converted" to a new Apple proprietary format (.photolibrary). Is there any way I can automate the creation of a folder structure like this:

Photos Library/Example_Album/IMG_0001.jpeg

Without losing any quality?

Here is what I tried:

  • Right-clicking onto Library and selecting "Show Package Contents": files seem to be in a wrong structure
  • Dropping all Albums from Photos to Desktop: does not export files with correct "Albums" folders

Help will be much appreciated!

Best Answer

Sounds like this would solve this problem more simply:

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
end makeFolder

Although I haven't tested it myself, it is a script to export selected albums into a folder structure in Finder with he album names as Folder names.