OPosselt

Q: os x photos - export library with the correct structure

Hey guys,

 

I sorted my library the following way in OS X photos :

 

year (folder)

I-> album name

I-> ...

year (folder)

I-> album name

I-> ...

#etc...

 

Is it possible to export the complete library with this structure? I only found a way in photos where you can export the library using the moment name as folder name.

 

Thanks for your help,

Oliver

MacBook Pro with Retina display, OS X Yosemite (10.10.3), 13"

Posted on Aug 18, 2016 4:05 AM

Close

Q: os x photos - export library with the correct structure

  • All replies
  • Helpful answers

  • by OPosselt,Solvedanswer

    OPosselt OPosselt Aug 18, 2016 8:15 AM in response to OPosselt
    Level 1 (18 points)
    Photos for Mac
    Aug 18, 2016 8:15 AM in response to OPosselt

    You can use the following Apple Script to automate the export of all albums into separate folders:

     

    set dest to "/Volumes/Extreme 500/export/" as POSIX file as text -- the destination folder (use a valid path)

     

    tell application "Photos"

      with timeout of 6400 seconds

     

      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 timeout

    end tell

     

    on makeFolder(tPath)

     

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

     

    end makeFolder

  • by LarryHN,Helpful

    LarryHN LarryHN Aug 18, 2016 8:15 AM in response to OPosselt
    Level 10 (84,217 points)
    Photos for Mac
    Aug 18, 2016 8:15 AM in response to OPosselt

    That is not a feature of Photos - it can export using the moments structure

     

    there is a user script to export albums as folders  - Export Albums to Folders - Jacques Rioux's Script

     

    LN