Mass copy descriptions to title field

I used to use Aperture and meticulously added captions (I think that's what it was called) to my photo's. Now I HAVE to use photos (aaaaaaargh), the imported library has updated the descriptions of each photo with the caption from Aperture. However, there is no way to show this in the overview section (where you can see all your photo's) where you can only add the title to the view, not the description.


I'm looking for a way to batch copy my descriptions to the title of each photo. There's no option in photo's as far as I can tell so I'm hoping maybe another option (outside of photo's perhaps, automator?). I don't want to have to do this by hand for 30,000 photo's.


Thanks!


Cees

MacBook Pro 13″, macOS 10.15

Posted on Jan 3, 2021 12:33 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 3, 2021 3:08 AM

Cees, I am using an Apple Script like this to copy between the metadata fields in Photos.

This simple script is to be used like this:

  • Select some photos in Photos, but only in All Photos or in an album at the top level of My Album, not in an album nested in a folder.
  • Then open the script in Script Editor and click the Run button ▶︎

Tt will now copy the descriptions of the selected photo to the title field, if a description exists. It will show the photo it is currently processing (so you will see a lot of flickering). if you do not want to see the flickering, comment out the line by prefixing it with --

spotlight im

I have only tested this script in Photos 6 on macOS 11 Big Sur.


(* This script copies the description of photos to the title field

  To run the script, select at least one photo in a top level album or in All Photos. 
  You can select and batch change several photos at once. 
  But do not select the photos in a smart album or an album inside a folder.
 This script is useful, if you are viewing your photos in applications, that can show the title below the thumbnail.
  Author: Léonie 2020
*)


set imageSel to {}
set separator to " - "


tell application "Photos"
	activate
	try
		set imageSel to (get selection)
	on error errTexttwo number errNumtwo
		display dialog "Cannot get the selection: " & errNumtwo & return & errTexttwo
	end try
	if imageSel is {} then
		error "Please select some images."
	else
		repeat with im in imageSel
			set newTitle to ""
			-- get the description of the image if it exists
			set newTitle to (the description of im) --as string
			
			set hasDescription to (newTitle is not equal to missing value) and (the length of newTitle > 0)
			
			
			
			if hasDescription then
				try
					
					tell im
						set its name to newTitle
					end tell
				on error errText number errNum
					display dialog "Error: " & errNum & return & errText & "Trying again"
					try
						delay 2
						tell im
							set its name to newTitle
						end tell
					on error errTexttwo number errNumtwo
						display dialog "Skipping image due to repeated error: " & errNumtwo & return & errTexttwo
					end try
				end try
				spotlight im
			end if
		end repeat
	end if
end tell
-- display dialog "Done"
return newTitle


Similar questions

2 replies
Question marked as Top-ranking reply

Jan 3, 2021 3:08 AM in response to ceesfromprahran

Cees, I am using an Apple Script like this to copy between the metadata fields in Photos.

This simple script is to be used like this:

  • Select some photos in Photos, but only in All Photos or in an album at the top level of My Album, not in an album nested in a folder.
  • Then open the script in Script Editor and click the Run button ▶︎

Tt will now copy the descriptions of the selected photo to the title field, if a description exists. It will show the photo it is currently processing (so you will see a lot of flickering). if you do not want to see the flickering, comment out the line by prefixing it with --

spotlight im

I have only tested this script in Photos 6 on macOS 11 Big Sur.


(* This script copies the description of photos to the title field

  To run the script, select at least one photo in a top level album or in All Photos. 
  You can select and batch change several photos at once. 
  But do not select the photos in a smart album or an album inside a folder.
 This script is useful, if you are viewing your photos in applications, that can show the title below the thumbnail.
  Author: Léonie 2020
*)


set imageSel to {}
set separator to " - "


tell application "Photos"
	activate
	try
		set imageSel to (get selection)
	on error errTexttwo number errNumtwo
		display dialog "Cannot get the selection: " & errNumtwo & return & errTexttwo
	end try
	if imageSel is {} then
		error "Please select some images."
	else
		repeat with im in imageSel
			set newTitle to ""
			-- get the description of the image if it exists
			set newTitle to (the description of im) --as string
			
			set hasDescription to (newTitle is not equal to missing value) and (the length of newTitle > 0)
			
			
			
			if hasDescription then
				try
					
					tell im
						set its name to newTitle
					end tell
				on error errText number errNum
					display dialog "Error: " & errNum & return & errText & "Trying again"
					try
						delay 2
						tell im
							set its name to newTitle
						end tell
					on error errTexttwo number errNumtwo
						display dialog "Skipping image due to repeated error: " & errNumtwo & return & errTexttwo
					end try
				end try
				spotlight im
			end if
		end repeat
	end if
end tell
-- display dialog "Done"
return newTitle


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mass copy descriptions to title field

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