batch editing metadata

Sorry if this has been asked and answered previously. I don't see it in a search. There used to be some scripts that allowed a Photos user to select multiple photos and batch edit metadata. For example, there was a script that allowed you to select a series of photos and set the name of the photos to be the date and time they were taken.


That script doesn't seem to work anymore. Is there a new way to do this, or has Apple once again eliminated useful functions from its photo editing software?

Mac mini, macOS Sierra (10.12.3), Mini (2.6 Inte core i5/iphone 6s

Posted on Mar 8, 2017 4:30 PM

Reply
9 replies

Mar 9, 2017 3:04 PM in response to SilverdaleJB

What script were you using?


Have you tried this script: Script: Batch Changing the Title to the Capture Date

You can download a compiled version of the script as an application from this tutorial site: P01 - Applescripts from Photos’ User Tips Compiled as Applications


It works with Sierra and takes this:

User uploaded file

and gives you this:

User uploaded file

or there's this script: Batch Change Title to Capture Date-Description-Padded Sequential Number, which gives you the option for both the date and a brief description.


User uploaded file

Mar 9, 2017 4:03 PM in response to Old Toad

So I downloaded the script and tried to run it. A window opens up on my screen with the following instructions:


How to use this script:

1 - Collect all photos you want to set to the same time in an album and sort them manually

2 - Adjust the time of the first of your batch of photos with "Adjust Date and time" in Photos from the "Image" menu, even if the time is correct

3 - Select first the photo with the adjusted date, the hold down the Shift key and select all photos you want to set to the same date and time at once. You need to select at least two photos.

4 - Open this script and run it by pressing the "Run" button.

5 - The script will copy the date from the first image and set all photos to the same date, and step the date by adding the increment given by the variable timeIncrement.


There's no way to open the script. I choose open from the script in the dock, and I get the instruction screen. There is no "run" button. I had a script from leonie that used to work with the first version of Photos, but it no longer works from my services menu in Photos now that I'm using the latest version from OS Sierra. This is what I want to do, but I'm not seeing how I can actually make it work.

Mar 9, 2017 4:51 PM in response to SilverdaleJB

Yes, the script I tried was not the correct script. It batch changed the capture date to the same date for all selected images. I need a script that allows me to select a number of images and automatically change the title of the image file to "(date) at (time)" so that an image would be named "3/9/2017 at 13:31:01" if the photo was taken on March 9, 2017 at 1:31:01 in the afternoon. Leonie had written a script that allow me to do that, and it worked in an earlier version of Photos, but that script, which can still be accessed from the services menu in Photos, no longer works.


Is there a new version of that script, or did Automator change in some way so that I would have to rewrite it. For example, the script you pointed me to is as follows:


set timeIncrement to 1 -- the time increment in minutes

(* select at least 2 images in Photos *)

tell application "Photos"


activate

set imageSel to (get selection)

if (imageSel is {}) or (the length of imageSel < 2) then

error "Please select at least two images."

else

set first_image to item 1 of imageSel

set first_date to (the date of first_image) as date

repeat with i from 2 to count of imageSel


set next_image to itemi of imageSel

set next_date to (the date of next_image) as date


set time_difference to (first_date - next_date) + ((i - 1) * timeIncrement * minutes)


tell next_image

set the date of next_image to (next_date + time_difference) as date

end tell

end repeat

end if

return "Adjusted the date and time of " & (the length of imageSel) & " photos. The last date is " & ((the date of next_image) as date)

end tell


There should be a way to tell photos to select the date and time the first image was created, then set the title to be {"date" at "time}, then select the next image file, select the date and time that second image was created, then set the title to be {"date" at "time}, etc. until it has done that with all the selected images. I know there was script language that did that before.

Mar 11, 2017 11:39 AM in response to Old Toad

It has been very difficult for me to access the English Apple Support Communities at all for the last two weeks. All of us, who started to participate in the new German forums, have been nearly locked out here. I could occasionally look in, but it was rarely possible to post a reply. Today it is much better. The last maintenance session seems to have fixed a few things.


BTW, the new German community is fun. I think, I'll spend a lot of time over there.

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.

batch editing metadata

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