

Repeat with i from 1 to count of imageSel This script has been tested in Photos version 1.0, with MacOS X 10.10.3Įrror "Please select at least one image." if you save this script as an Application you can add it to the Dock and run it from there The script will return the last date of the last photo it changed The script will resd the capture date from the first image and create a short date string according to the system preferences for the shart date format Open this script and run it by pressing the "Run" button. select all photos you want to change the title in Photos (* Batch change the titles of the selected photos to the capture time This script works for me with the System Preferences set as above:
#Apple photo batch process title mac#
If you changed the formats, restart the mac or running apps may crash! It will use the Short format you set in the System preferences: Click the arrows to the right of the format entries to switch between "=1" and "Jan" etc. But the "Date" class has a property to return the date string in a short format - use " theshort date string of xxxdate". check, if the album or the selected photos do contain imagesĭisplay dialog "Error: " & errNum & return & errText & "Trying again"ĭisplay dialog "Skipping image due to repeated error: " & errNumtwo & return & errTexttwoĪpple Script will use the "Full date format" as set in the System Preferences > Language & Region > Advanced" to return a date string. SetimageSel to every media item ofthePhotosBufferĮrror "Album " & theAlbumName & "does not exist"ĭisplay dialog "Cannot open album: " & errNumtwo & return & errTexttwoĮlse- process the selected photos from the All Photos albumĭisplay dialog "Cannot get the selection: " & errNumtwo & return & errTexttwo SetthePhotosBuffer to containertheAlbumName If ( ReadFromAlbum ) then- the photos will be passed in a toplevel album named "PhotoDropBox" Set theAlbumName to "PhotoDropBox" - change this to the name of the album you will use set this to true, if you want to pass the photos in a toplevel album

When all photos are selected or in the album and all parameters set, press the "Run" button in Script Editor. If you want to pass the photos in a toplevel album, set ReadFromAlbum to true and change the variable "theAlbumName" to the name of the album you are using. If you want to select the photos without collecting them in an album, set the variable "ReadFromAlbum" to false Or collect the Photos in a top level defined album with a fixed name. Either select photos while viewing the "All Photos" album this works better than Moments or smart albumsĢ. The photos can be passed to the script in two ways:ġ. batch change the title of images to the filename All photos in this album will get their titles changed, when you press the run button in Script Editor. The photos are not passed by selecting them in Photos but by collecting them in a top level album with the fixed name "PhotoDropBox". This version of the script is to be run directly from the Script Editor.

Version 2: To be used with iCloud Photo Library
#Apple photo batch process title how to#
For a more elaborate AppleScript, with more error checks and removing the filename extension, check out the script that NicFletcher posted:Ī sample AppleScript and some technical observations on Photosįor a discussion on how to improve this script, see: Re: Re: Where are photo file names? My script will just give you the general idea how to access filename and title in an Apple Script. I put a version of the Automator workflow here in my Dropbox: When you click the selected photos again, the titles should change. The service should be shown in the menu - I saved my version as "filename2title".Now launch Photos and select a few test images.Launch Automator, create a new service, and drag a "Run Apple Script" action into the workflow.Ĭopy and paste the text above into the "Run Apple Script" action to replace the default text in the action. The Automator script version does not work well with iCloud Photo Library on Yosemite or El Capitan.Ĭreate an Automator action, that executes an Apple Script to change the titles to the filename, if the title is empty: Note: If you are using iCloud Photo Library scroll down to "Version2" - the Apple Script version. To batch change the titles of photos without title, to make them visible below the thumbnails, you could try an Automator script I wrote to bring the titles back: Photos does not show the filenames as titles, and if a photo has no title, there is no identification visible in the browser, only in the Info panel. In iPhoto the filenames have been as used as default titles and shown below the thumbnails in the browser.
