You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Script: Batch Append Text to the Description of a Photo

by: 
Last modified: Feb 8, 2018 4:16 AM
1 2238 Last modified Feb 8, 2018 4:16 AM

Photos 1 to Photos 3.0 on High Sierra does not support to append a text to the descriptions of several photos at once.

To batch append some text to the descriptions of selected photos you could try a simple Apple Script.

Select the photos in Photos, then run this script from Script Editor or the scripts menu. The script will ask you for text to be appended to the current description.



-- Batch append a text to a description, author: léonie


set toAppend to text returned of (display dialog "Enter the new caption: " default answer "" buttons {"OK"} default button "OK")


-- batch change the description to the input

tell application "Photos"


activate

set imageSel to (get selection)

if imageSel is {} then

error "Please select some images."

else

repeat with im in imageSel

tell im

if exists {its description} then

set old_desc to get its description as text


else

set old_desc to ""

end if

if old_desc is "missing value" then set old_desc to ""

set the description to (old_desc & toAppend as text)

end tell

end repeat

end if

end tell

return imageSel

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