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.

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
Question marked as Top-ranking reply

Apr 11, 2015 5:41 PM in response to TheNakedApe

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



Apr 9, 2015 8:33 AM in response to léonie

I am not referring to photo "Titles" -- I am referring to photo filenames. In iPhoto, when "Titles" was selected under the View menu, the camera-assigned filenames would appear below the photos. You could then edit the "titles" as seen below:

User uploaded file

In Photos, these "Titles" do not appear, even if View -> Metadata -> Titles is selected. The only way to see them is to in the "Info" panel, as you mentioned above. This makes the hours and hours of time I have spent over the years renaming photos' filenames to a more meaningful "title" in iPhoto totally wasted! You can't see the "titles" (i.e., renamed filenames) in any of the list displays in Photos -- and to make matter worse, since Photos does not include the renamed filenames created in iPhoto, you cannot use that information in searching for the photos!

Apr 9, 2015 10:19 AM in response to thedatadude

I have your exact same problem. Very frustrating. Perhaps the Apple software engineers could have foreseen this problem. Overall, Photos 1.0 is disappointing in many respects. Sadly, when you go to the Apple Feedback site, there is no option to give feedback on Photos. iPhoto is still listed on that page. Again, shouldn't someone have thought to update that page knowing users are going to have a lot of feedback about Photos 1.0.


If anyone comes up with a solution, please let us know. Here's a link to discussion of my question.

https://discussions.apple.com/thread/6984161

Feb 26, 2018 11:29 PM in response to angelafromfrustrationville

Your screenshot is showing that you are currently running Script Editor and are trying to open the Photos application in script Editor. There may be a misunderstanding, how to use Apple Scripts. ScriptEditor can open Apple Scripts, not other applications.


For example, If you want to run the script described here: Script: Batch Changing the Titles to the Filename w/Extension ,

  • open the Photos.app by clicking the icon in the Dock,
  • then select the photos where you want to change the titles,
  • launch Script Editor and select to create a new script,
  • then copy and paste the code of the script into an open Script Editor window and click the Run button in Script Editor.

The script will run and tell the Photos application to change the titles of the selected photos to the filenames.

Test it on a new Photos Library, not on your main library, before you try it on your main library. And make a current backup of your Photos Library, before try to run scripts soon the library.

Apr 9, 2015 8:38 AM in response to thedatadude

Just to clarify -- it appears that when Photos imports images from iPhoto, it totally ignores any filename renaming that you have done. It simply does not import that information! So if you had a thousand photos in iPhoto that you "titled" by changing "IMG_2345" to "Fred in NYC", etc. -- all that work is completely lost because Photos completely ignores that information when it imports the images from iPhoto.

Apr 9, 2015 10:40 AM in response to thedatadude

I am not referring to photo "Titles" -- I am referring to photo filenames. In iPhoto, when "Titles" was selected under the View menu, the camera-assigned filenames would appear below the photos. You could then edit the "titles" as seen below:

And that is what I am seeing in Photos - the iPhoto titles below the thumbnails:


In iPhoto, before migrating the library: The default version name remained in iPhoto's Title field:

User uploaded file

And in Photos - the same name below the thumbnails, after migrating the iPhoto Library, clearly visible in the "Moments" view.

User uploaded file

Toggling "View > Metadata > Titles" turns this on and off.

Apr 9, 2015 11:32 AM in response to léonie

Some of us are experiencing a situation where Toggling "View > Metadata > Titles does not solve the problem. Yes, it's a necessary step to make titles below photos visible, but, even with that, many photo titles are not appearing. Some do and some don't. In my case, any photo title from iPhoto that had a suffix such as .jpg, .tif, etc. DOES NOT APPEAR under the photo regardless of what is checked under Metadata.


User uploaded file

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?

Apr 9, 2015 1:32 PM in response to léonie

Léonie,


As a further clarification, because this has huge implications for those of us that have "titled" thousands of photos in iPhoto, which are not carried over to the new Photos app:


Here is an example of a photo to which I edited the filename (D7K_2242) in iPhoto:

User uploaded file

Note that the full title (which is actually the edited filename) appears in iPhoto.


Here is the same photo as it appears in Photos in the Moments view:

User uploaded file


Here are my Metadata settings in Photos:

User uploaded file

So..

--- Even when "titles" are turned on under Metadata

--- and when in the Moments view in Photos

The filename edited in iPhoto (="title") does not appear in Photos.


I have discovered one way to remedy this, but it is NOT a practical remedy when you have thousands of "titled" photos in iPhoto with lots of albums, etc.

--- In iPhoto: Select a photo, then: File -> Edit -> Export, with these settings:

User uploaded file

Any other settings for Kind (e.g., Original) will result in the title not carried over to Photos. Here's how the above export looks in Photos:

User uploaded file

As I said above, this is not a reasonable solution because among other things you can only export a file as a "jpeg" and not as an "Original", which was a "raw" file. So I guess off I go to report this as a "bug" to Apple.

Apr 11, 2015 4:14 PM in response to kuc1n9

I'm not sure this is much of a solution for users importing directly from iPhoto, but one way to make Photos.app show the filename as the title is to create/set the IPTC Title tag before importing your photos into Photos.app.


I'm using ExifTool in a service created through Automator that executes a shell script so that I can select a batch of photos and apply several changes to EXIF tags. But you can easily add a line to also create the IPTC Title tag and set it to the filename.


Here is an example that strips out the file extension and uses a formatting option to start the title after the id (ex: 20150411-000...) I'm using in the filename. You could set the {16} to {0} to return the entire filename as the title.


User uploaded file


Just install ExifTool and then create this service and save it. Then you can right click on an image (or a group of images) and batch update the tags.

Apr 12, 2015 2:25 PM in response to thedatadude

Couldn't find a solution within Photos, so I resorted to AppleScript:


Here's a really quick and dirty way to do it... I'm sure this could be improved to do proper interpreting of the filename and have proper error conditions:

tell application "Photos" activate set myalbum to the last import album try set itemlist to selection on error errStr number errorNumber return errorstr end try repeat with currentitem in itemlist set currentfile to the filename of currentitem set the name of the currentitem to currentfile as text end repeat end tell return count itemlist

Just open up Script Editor, enter that code into a new item, select the items you want named in Photos, and then run the script.


To do even better, I created a smart album that only contains un-named items. It appears I can't do thousands of photos in one pass, but a few hundred at a time works well.

Apr 13, 2015 3:32 PM in response to DRedfearn

DRedfearn wrote:

I get as far as creating a new service and dragging the "run apple script" action to the workflow. I then paste in your script. However, at that point, my screen doesn't look like your clip - I don't see the "Service Receives box in Photos App" and the other options I see at the top of your clip.

It sounds like you started by selecting a Workflow document type in Automator. Instead, try starting by selecting the Service document type:

User uploaded file

Tip: when you are getting errors from Automator workflows from Applescript actions, it is sometimes helpful to run the script in Script Editor & use the log > Results window to see exactly what's going on step by step.

Apr 16, 2015 11:41 AM in response to léonie

Léoni;

I got this thread from another post I made, so .....

I tried creating the Automator script but it does not run nor does the new service appear in Photos' services. When I try running the script from Automator, with Photos open and a picture file selected, I get the follow error:

User uploaded file

This being my first sue of Automator there's is likely some subtle thing I am doing wrong. Any guidance will be appreciated.


Thanks... Chris

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.