Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

PHOTOS: how do I add the description to multiple pics?

In iPhoto there was a Batch update function so you could set the Description for multiple selected photos at once.


Where is this in the new Photos app?


I want / need to be able to save the "story" that goes with a selection of pictures. There may be several groups in one day with different stories. how can I do this without going through them all one by one?


All comments appreciated!

iMac, OS X Yosemite (10.10.3), The New Photos app

Posted on Apr 14, 2015 9:10 AM

Reply
Question marked as Best reply

Posted on Apr 14, 2015 9:34 AM

User léonie posted the following Automator workflow to add the same description to all selected photos.

on run {input, parameters}

-- 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

set the file name to input

end tell

end repeat

end if

end tell

return input

end run

Copy and paste the above script into Automator as shown in this screenshot and save as a application:

User uploaded file


Place the resulting app wherever it works best for you.


FWIW she also posted this script that will put the file name of the selected photos in the Title field which iPhoto does. Copy and paste into Applescript and save an an application.


tell application "Photos"

activate

set imageSel to (get selection) -- get a list of selected images

set counter to 1

set currentfilename to ""

if imageSel is {} then

error "Please select an image."

else

repeat with im in imageSel

set title to the name of im

if not (exists (title)) then

set currentfilename to the filename of im as text -- retrieve the filename of image "Im"

set newname to currentfilename & "." & counter

set counter to counter + 1 -- increment the counter

set the name of im to newname -- write the newname to the title field

end if

end repeat

end if

return currentfilename -- return the filename of the last image

end tell

User uploaded file

18 replies
Question marked as Best reply

Apr 14, 2015 9:34 AM in response to Pay Attention

User léonie posted the following Automator workflow to add the same description to all selected photos.

on run {input, parameters}

-- 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

set the file name to input

end tell

end repeat

end if

end tell

return input

end run

Copy and paste the above script into Automator as shown in this screenshot and save as a application:

User uploaded file


Place the resulting app wherever it works best for you.


FWIW she also posted this script that will put the file name of the selected photos in the Title field which iPhoto does. Copy and paste into Applescript and save an an application.


tell application "Photos"

activate

set imageSel to (get selection) -- get a list of selected images

set counter to 1

set currentfilename to ""

if imageSel is {} then

error "Please select an image."

else

repeat with im in imageSel

set title to the name of im

if not (exists (title)) then

set currentfilename to the filename of im as text -- retrieve the filename of image "Im"

set newname to currentfilename & "." & counter

set counter to counter + 1 -- increment the counter

set the name of im to newname -- write the newname to the title field

end if

end repeat

end if

return currentfilename -- return the filename of the last image

end tell

User uploaded file

Apr 16, 2015 11:31 AM in response to Old Toad

Thank you for your help Old Toad.


Unfortunately I don't know how to use Automator. I started it from Launch Pad. Automator presents a selection panel : Choose a type for your document.

I chose Application (instead of Workflow, Service, Print Pluin, Folder Action, Calendar Alarm, Image Capture Plugin, Dictation command).


It then gives this screen. It doesn't look like the one you showed, where you entered text in an applescript window....


User uploaded file


Am I missing a step to create an applescript? This is all new to me.

Apr 17, 2015 10:11 AM in response to Pay Attention

When you first launch Automator click on the New Document button. Next click on the application button:

User uploaded file

Next Search for Ask for Text and drag that item into the window on the right:

User uploaded file

Enter the text that léoni has in her screenshot.

Search for Run Applescript and drag it into the window on the right.

Copy and paste the script from above and paste into the Automator window.

Save as an application.

Put the application in the Applications folder and drag it to the Dock.

Select the photos in iPhoto you want to name and double click on the app in the Dock.

Apr 19, 2015 9:46 AM in response to Chrigel

I got the same result as Chrigel. Title was changed in 6 out of 12 selected. More details below ...


Here's the Automator window showing both elements:-

User uploaded file


When the application runs (with Photos open and pictures selected)

It produces this message


User uploaded file



at this point I press Continue


and then the following is displayed


User uploaded file


On my first try nothing happened.

Try 2 - 6 out of 12 titles were changed

Try 3 - nothing happened

Try 4 - 1 out of 6 titles were changed.



Seems like it's almost there. I appreciate the time you're putting n on this.

Apr 19, 2015 1:44 PM in response to Old Toad

I really appreciate the time and effort you guys take to help us. I am pretty experienced with Mac's but have never used an Automator Script.


I thought I really followed instructions and copy and paste the following script"


on run {input, parameters}

-- 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

set the file name to input

end tell

end repeat

end if

end tell

return input

end run


Then I saved it as an Application and put it into the dock. I am using the latest apps with. 10.10.3 and Automator 2.5.


Here is the fault I get when I run it inside Automator.User uploaded file

Apr 19, 2015 3:33 PM in response to Chrigel

I couldn't get that to work either. However, this new one does:

on

run {input, parameters}

-- batch change the title to the input


set n_digits to 3 -- how many digits for the appended number

tell application "Photos"

activate

set counter to 1

set imageSel to (get selection) -- get selected images

if imageSel is {} then

error "Please select some images."

else

repeat with im in imageSel

set ntext to the counter as text

repeat while (the length of ntext < n_digits) -- add leading zeros

set ntext to "0" & ntext

end repeat



tell im

set the name to input & "-" & ntext as text

-- set the title to the input plus number

set counter to counter + 1

end tell

end repeat

return ntext

end if

end tell

return input

end run

It will give you this result: File Name-001.jpg, File Name-002.jpg, etc. See id you can replace the code in your Automator workflow application with the above and get it to work.

Jun 29, 2015 2:11 PM in response to Old Toad

OT,


I've tried both scripts to no avail. Leoni's script gives this message when the App is run outside Automator:


The action “Run AppleScript” encountered an error.

Check the actionʼs properties and try running the workflow again.


and this when run inside Automator:


Syntax Error

Photos got an error: Can’t set file missing value of media item id "Dd78S8OnShGl149.4924d4xdNgQ" to current application.


Sadly I haven't got a clue on how to debug Apple Script. How do compile it inside Apple Script? FWIW This is like being at Uni again cribbing my mate's Pascal project before he went home for study leave....


Many thanks for your patience...

PHOTOS: how do I add the description to multiple pics?

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