Hier eine einfache AppleScript Lösung…

Kopiere das script in den Script Editor und speichere es as Application/Programm ab.

Dann kannst du entweder Ordner auf das Icon ziehen oder die App doppelklicken und mehrere Ordner auswählen.

Das script erwartet das Datum im Ordnernamen im Format yyyyMMdd, das Format wird nicht geprüft.

Das script macht folgendes:

  • Extrahiere das Datum im Ordnernamen.
  • Erstelle ein neues Album in Photos falls es noch nicht existiert.
  • Importiere alle Dateien im Ordner in Photos in das Album.
  • Setze das Datum aller importieren Dateien auf das Datum im Ordnernamen



Show Plain Text
  1. on run
  2.   open (choose folder with multiple selections allowed)
  3. end run
  4.  
  5.  
  6. on open theItems
  7.   repeat with anItem in theItems
  8.     tell application "Finder" to set isFolder to class of item (anItem as text) is folder
  9.     if isFolder then
  10.       tell application "Finder"
  11.         set theImages to files of anItem as alias list
  12.         set albumName to name of anItem
  13.       end tell
  14.      
  15.       tell albumName to set {yr, mn, dy} to {text 1 thru 4 as integer, text 5 thru 6 as integer, text 7 thru 8 as integer}
  16.       tell (current date) to set folderDate to it - (its time)
  17.       tell folderDate to set {its day, its year, its month, its day} to {dy, yr, mn, dy}
  18.      
  19.       tell application "Photos"
  20.         if not (exists album albumName) then
  21.           set newAlbum to make new album named albumName
  22.         else
  23.           set newAlbum to album albumName
  24.         end if
  25.         set importedImages to import theImages into newAlbum
  26.         repeat with anImage in importedImages
  27.           set date of anImage to folderDate
  28.         end repeat
  29.       end tell
  30.     end if
  31.   end repeat
  32. end open
----------
Gruss

Stefan