Created
November 29, 2017 20:50
-
-
Save MrMage/d97a093332c68bdd0601ff160cf30d0b to your computer and use it in GitHub Desktop.
JXA (JavaScript for Automation) to add photos with a specific filename to a Photos album
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var photos = Application("Photos"); | |
var al = photos.albums.whose({ name: 'ALBUM_NAME' })[0].get(); | |
photos.add([photos.mediaItems.whose({ filename: 'FILE_NAME.jpg' })[0].get()], { to: al }); | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment