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:
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
- on run
- open (choose folder with multiple selections allowed)
- end run
- on open theItems
- repeat with anItem in theItems
- tell application "Finder" to set isFolder to class of item (anItem as text) is folder
- if isFolder then
- tell application "Finder"
- set theImages to files of anItem as alias list
- set albumName to name of anItem
- end tell
- 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}
- tell (current date) to set folderDate to it - (its time)
- tell folderDate to set {its day, its year, its month, its day} to {dy, yr, mn, dy}
- tell application "Photos"
- if not (exists album albumName) then
- set newAlbum to make new album named albumName
- else
- set newAlbum to album albumName
- end if
- set importedImages to import theImages into newAlbum
- repeat with anImage in importedImages
- set date of anImage to folderDate
- end repeat
- end tell
- end if
- end repeat
- end open