Script: Batch clear the Title of selected Items in Photos for Mac

by: 
Last modified: Jun 12, 2023 11:53 AM
2 300 Last modified Jun 12, 2023 11:53 AM

This is a slight modification of a script "OTs Clear Title" sent to me by Old Toad. It has been tested on macOS 13 Ventura and will revert the titles of the selected item to an empty title, so Photos will again display the filename below the thumbnails as the default title.

To use the script,

  • Open the Script Editor on a new, empt< script.
  • Copy and paste the code below into the empty script window.
  • Select the photos in Photos where you want to clear the titles.
  • Then click the "Run Script" button ▶︎ in the toolbar of Script Editor.
  • Wait for the script to finish.

You can save the script for later use either as a script or an app, that can be added to the Dock. Use "File > export" in Script editor and select the format "Script" or "App".


--- ✄ ---- ✄ --- copy the code below -------- ✄-----


(* By Old Toad and léonie

select at least 1 image in Photos *)

tell application "Photos"
	activate
	set imageSel to (get selection)
	if (imageSel is {}) then
		error "Please select at least one image."
	else
		repeat with next_image in imageSel
			set new_title to ""
			tell next_image
				set the name of next_image to the new_title as string
			end tell
		end repeat
	end if
	return "Adjusted the titles of " & (the length of imageSel) & " photos. The last date is " & ((the date of next_image) as date)
end tell

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.