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.

📰 Apple Fitness+ unveils an exciting lineup of new ways to stay active and mindful in 2025

Offerings include new programs for strength, pickleball, yoga, and breath meditation, and a new collaboration with Strava. Learn more >

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

Where are photo file names?

I've "titled" many, many photos in iPhoto by changing the filename (e.g. "DSC_2254" --> "On vacation in Hawaii"), but there appears to be no option in Photos to show the filename. So none of my "titles" appear. Am I missing something?

iMac (Retina 5K, 27-inch, Late 2014), OS X Yosemite (10.10.3)

Posted on Apr 9, 2015 7:56 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 11, 2015 5:41 PM

That is an idea.


I experimented a bit, and with Apple Script we could make it a bit simpler, directly in Photos: This will save the installation of exiftool and the necessity to export the files. This way the lossless workflow will be preserved.


Create an Automator action, that executes an Apple Script to change the titles to the filename, if the title is empty:


The Apple Script:


on run {input, parameters}

tell application "Photos"

activate

set imageSel to (get selection)

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 the name of im to the filename of im

end if

end repeat

end if

end tell

return input

end run

Launch Automator, create a new service, and drag a "Run Apple Script" action into the workflow.

Copy and paste the text above into the "Run Apple Script" action to replace the default text in the action.

User uploaded file

Save this workflow with a suitable name. It will be installed in the services.


  • Now launch Photos and select a few test images.
  • Open the "Photos Menu > Services".
  • The service should be shown in the menu - I saved my version as "filename2title".
  • Select the service to let it run. When you click the selected photos again, the titles should change.


User uploaded file

After the Automator action completed:

User uploaded file



282 replies

Feb 8, 2018 4:28 AM in response to MortenJamesCarlsen

If you open your Photos Library in Power Photos as a second browser, you can seethe metadata as column in a nice list view, or you can show the filenames as a subtitle below the thumbnails.

Even the free trial version can do this.

User uploaded file

As an added bonus, the grid view can show the thumbnails on a dark background:

User uploaded file

For a very large library PowerPhotos needs a long time to launch, so I simply keep it open at all the time.

Feb 8, 2018 8:59 AM in response to thedatadude

Once you set Titles to be viewed in the View ➙ Metadata menu option use this AppleScript to put the file names of the selected photos into the Title field: : Script: Batch Changing the Titles to the Filename w/Extension or Script: Changing the Title to the Filename without Extension.


A list of the various user tips are available here:Thematic Index to Photos for Mac Related User Tips:


User uploaded file

Feb 26, 2018 7:46 PM in response to LarryHN

While I appreciate being judged as much as anyone, I'm actually not that guy. I read the other replies. I saw the running a script option. I've never done that before, but I opened script editor and gave it a whirl. I didn't get very far because I have High Sierra, and my options are not the same. Under input, in the drop down menu of available apps, "Photos" is grayed out. So that was a dead end.


I called apple support, and he said there is no fix. He agreed that the interface should be repaired so that the file names pop up the second we select "Titles." He told me to go to the help page and let the developers know that there is still a demand for this fix. So I did. So...maybe I got the wrong guy, I don't know.

User uploaded file

Apr 9, 2015 11:50 AM in response to Washington Apples

Notice that "Add a Title" appears. The title (filename) was "Ann in Tennessee Shirt" in iPhoto and it appeared under the photograph. In Photos 1.0, however, it does not appear. One has to copy "Ann in Tennessee Shirt" and the paste it into the "Add a Title" field. Can you imagine doing this for thousands of photos?

That is clearly a bug.

The titles are supposed to be transferred, even if .jpg is part of the title.


Please file a bug report. Either use the feedback form or - more involved - the bug reporter: Detailed and Effective Bug Reporting | Apple Support Communities

Apr 13, 2015 3:44 AM in response to léonie

léonie wrote:

I experimented a bit, and with Apple Script we could make it a bit simpler, directly in Photos: This will save the installation of exiftool and the necessity to export the files. This way the lossless workflow will be preserved.

Great work, léonie! You should make that into a user tip. 🙂


I'm curious. Have you tried this with a large number of images selected? I ask because while I was experimenting with Photos' Applescript support, I wrote a script to add a keyword to every item in its library. I wrote about that in Anyone scripting Photos.app yet? in the OS X technologies forum because I noticed that (I think) Photos takes a brief amount of time to add keywords, & without the delay I added to that script it ran faster than Photos could handle & produce errors.


The mechanism for handling keyword additions is probably different from replacing an empty title with a non-empty one, but if anyone finds that your script chokes with lots of images selected (or mods the script to batch change all the images at once) the fix might be to add a delay, although of course that will mean the script could take a long time to run.

Apr 17, 2015 12:15 PM in response to Chris Lyons

Chris Lyons wrote:

On a related topic, I tried deleting the newly created filename-as-title and tried the script again. Does not work. Its almost as if once a title is created and then deleted the script "sees" a title and won't overwrite it. Do you have any ideas as to a different script that would erase a previously created title ?

That is exactly what happens. The details are in this post but the bottom line is you need to modify the ifnot (exists (title)) then line of the script as follows:


ifnot (exists (title)) ortitle = "" then


This should fix that problem.

May 4, 2015 3:14 AM in response to turingtest2

Bah, nothing is ever easy. That works fine if you run the script from the script editor, but If I try to wrap it up as part of an automator action in the way that léonie has shown in Script: Batch Changing the Titles to the Filename w/Extension then the use scripting additions clause won't compile, but tell me... end tell seems to work. 😕


tt2

May 4, 2015 4:59 AM in response to turingtest2

turingtest2 wrote:

Bah, nothing is ever easy. That works fine if you run the script from the script editor, but If I try to wrap it up as part of an automator action in the way that léonie has shown in Photos for Mac: Batch Changing the Titles to the Filename then the use scripting additions clause won't compile, but tell me... end tell seems to work. 😕

Like I said, I really don't understand what's going on with this. Part of my problem is I haven't kept up with the newer additions to the AppleScript language like use statements, so for instance I thought that unless an app had its own scripting library term that could conflict with a StandardAdditions one (like "offset" in the StandardAdditions String Commands suite), there was no need to explicitly declare which terminology to use.


But the current Apple Control Statements Reference doc says this:

If a script uses

use scripting additions
, AppleScript may optimize scripting addition commands, sending them to the current application instead of the current target (
it
) when it does not change the meaning to do so. For example, random number does not need to be sent to another application to work correctly, and will always be sent to the current application when imported with
use
. Without a
use scripting additions
command, AppleScript must use a less efficient dispatching scheme, so explicitly declaring them is recommended.

... so that may not still be true, but since Photos has no "offset" command of its own, maybe it is just a bug in Photos' Applescript implementation that is causing these weird "silent" errors that do not halt the script ... or something. 😕


I did find something that might (partially, maybe, dubiously) explain why the script won't compile wrapped in an Automator action at http://macosxautomation.com/mavericks/usestatement/01.html. If I understand it correctly, it says that if a script contains one or more use statements, then the script must include one for scripting additions. I realize you were doing that, but perhaps it might compile if you added a use application "Photos" statement to force it to use both?

May 4, 2015 10:25 AM in response to Old Toad

Old Toad wrote:


turingtest2:


I modified the script from your last post (which doesn't show up for me here - was it pulled for some reason?) to add several other extensions:

set exclude to ".jpeg.jpg.mov.png.tif.tiff.psd.nef.dng.cr2" -- Extensions to exclude from the image titles

set include to ".cr2" -- Extensions to include in the image titles

I've tested it with psd, nef, dng and cr2 files successfully. It didn't work with the .cr2 files unless I added it to the first line.


V1.3 should be here: Re: Re: Re: Re: Re: Where are photo file names?


Do you mean you needed to add .cr2 into the exclusion list before it would be force added by the inclusion list? That shouldn't be necessary but I just tried a little test and ran into the issue R C-R has mentioned about sometimes needing to close and reopen Photos to get current data from the database.


tt2

May 13, 2015 3:27 PM in response to Allison Sheridan

Your script does nothing because you set the title to the name of the selected image ("im" in the script repeat loop) & then tested for it not existing in the "if not (exists (title)) then" step. Because of that, it will always exist (even if the name is the empty text string "") & the name won't be changed.


You might try léonie's Batch Changes in Photos for Mac: Change the titles to a Given String Automator service -- it looks like it does what you want without the need for any modifications.

Where are photo file names?

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