This Applescript was created by user code!z and published at Github: ImportPhotoFolders where you can download an already compiled and saved Applescript file. With his permission I'm publishing the script here.
72 57 likes 47,021 views Last modified Apr 6, 2020 11:01 AM
Oct 02, 2017 Here are two apps to export notes as future-proof plain text files. Photo: Cult of Mac. Given that exporting your whole Notes library is usually a one-off affair, though, the extra. Dec 14, 2014 I am wondering how to export iPhoto library to external drive as a normal folder with jpeg files to be opened also on PC (no iPhoto app). Since we can export files with the Title used as the filename. Exporting iPhoto library as a regular folder to be opened on PC More Less. Apple Footer.
When run it will import selected folders of image files into your Photos library and create albums in the sidebar for each folder with the same name as the folder.
Open Script Editor and paste the following into its window:
onrun
set folderList to (choose folderwith multiple selections allowed)
tellapplication 'Photos'
activate
delay 2
endtell
repeatwith baseFolder in folderList
importEachSubFolder(baseFolder, null)
endrepeat
endrun
on importEachSubFolder(aFolder, parentFolder)
tellapplication 'Finder'
set albumName to (name of aFolder astext)
set subFolders toeveryfolderof aFolder
endtell
if (countof subFolders) > 0 then
set fotoFolder to createFotoFolder(aFolder, albumName, parentFolder)
Export Mac Photo Library To Plain Image Files Free
repeatwith eachFolder in subFolders
importEachSubFolder(eachFolder, fotoFolder)
endrepeat
else
How do i see library on mac. set fotoFolder to parentFolder
endif
importFotos(aFolder, albumName, fotoFolder)
end importEachSubFolder
on importFotos(aFolder, albumName, parentFolder)
set imageList to getImageList(aFolder)
if imageList is {} thenreturn
set fotoAlbum to createFotoAlbum(albumName, parentFolder)
tellapplication 'Photos'
withtimeoutof 600 seconds
import imageList into fotoAlbum skip check duplicates no
endtimeout
endtell
end importFotos
on createFotoFolder(aFolder, folderName, parentFolder)
tellapplication 'Photos'
if parentFolder isnullthen
make new folder named folderName
else
make new folder named folderName at parentFolder
endif
endtell
end createFotoFolder
on createFotoAlbum(albumName, parentFolder)
tellapplication 'Photos'
if parentFolder isnullthen
make new album named albumName
else
make new album named albumName at parentFolder
endif
endtell
end createFotoAlbum
on getImageList(aFolder)
set extensionsList to {'jpg', 'png', 'tiff', 'JPG', 'jpeg', 'gif', 'JPEG', 'PNG', 'TIFF', 'GIF', 'MOV', 'mov', 'MP4', 'mp4', 'MPG', 'mpg', 'BMP', 'bmp', 'TIF', 'tif', 'AVI', 'avi', 'PSD', 'psd', 'ai', 'AI', 'orf', 'ORF', 'nef', 'NEF', 'crw', 'CRW', 'cr2', 'CR2', 'dng', 'DNG', 'PEF', HEIC'}
tellapplication 'Finder' toset theFiles toeveryfileof aFolder whose name extension isin extensionsList
set imageList to {}
repeatwith i from 1 tonumberofitemsin theFiles
set thisItem toitem i of theFiles asalias
![Export Mac Photo Library To Plain Image Files Export Mac Photo Library To Plain Image Files](/uploads/1/2/6/2/126259866/925024837.jpg)
settheendof imageList to thisItem
endrepeat
imageList
end getImageList
This code will produce the following:
For this folder configuration on the hard drive: You'll get the following configuration in Photos:
For this folder configuration on the hard drive: You'll get this configuration in Photos:
Again, thanks to code!z for his contribution of this script.
You can download a compiled version of the script as an application from this tutorial site: P01 - Applescripts from Photos’ User Tips Compiled as Applications. Both versions will be downloaded by the same link.