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

May 17, 2015 1:42 PM in response to Allison Sheridan

The singing has stopped, but I'm still stuck. I can prove now, however, that there's a random effect. Just in case you guys can see something I'm missing, I made a little video. One caveat - I made a couple of tiny tweaks to the script while I was waiting for Photos to rebuild. I changed the default to 2 instead of 4 digits, I made the digits precede the text, and I fixed a minor typo (instead of o.k it now says OK). That shouldn't have affected my results. What you'll see in the video is:

  1. It worked in All Photos
  2. It worked in an album
  3. Then it didn't work in an album


https://dl.dropboxusercontent.com/u/57192/batch_change_problem.mp4

Jun 22, 2015 4:33 AM in response to davacorp

Are you using iCloud Photo Library? Then the script will not work well with Photos. The problem is the line "get selection".

Photos selected this way may give timeout errors.


I just updated the user tip, so it uses the work-around for this problem proposed by NicFletcher: Don't ask for the current selection, but add the photos you want to process to an album with a fixed name.

  • Create an album with a fixed name - mycurrentselection or similar - and add all photos you want to process to this album.
  • Instead of the "get current selection" process the photos in this album.



-- batch change the title of images to the filename

(* How to use this script:


Open this script in Script Editor. Launch Photos.


The photos can be passed to the script in two ways:

1. Either select photos while viewing the "All Photos" album; this works better than Moments or smart albums

2. Or collect the Photos in a top level defined album with a fixed name.


If you want to select the photos without collecting them in an album, set the variable "ReadFromAlbum" to false

If you want to pass the photos in a toplevel album, set ReadFromAlbum to true and change the variable "theAlbumName" to the name of the album you are using.


When all all photo are selected or in the album and all parameters set, press the "Run" button in Scripteditor.

*)


set ReadFromAlbum to true

-- set this to true, if you want to pass the photos in a toplevel album

set theAlbumName to "PhotoDropBox" -- change this to the name of the album you will use



set imageSel to {}


tell application "Photos"


activate

if (ReadFromAlbum) then -- the photos will be passed in a toplevel album named "PhotoDropBox"


try


if existscontainertheAlbumName then


set thePhotosBuffer to containertheAlbumName

set imageSel to every media item of thePhotosBuffer

else

error "Album " & theAlbumName & "does not exist"

end if


on error errTexttwonumbererrNumtwo

display dialog "Cannot open album: " & errNumtwo & return & errTexttwo

end try


else -- process the selected photos from the All Photos album

try

set imageSel to (get selection)

on error errTexttwonumbererrNumtwo

display dialog "Cannot get the selection: " & errNumtwo & return & errTexttwo

end try


end if



-- check, if the album or the selected photos do contain images

if imageSel is {} then

error "Please select some images."

else

repeat with im in imageSel

try


tell im


set its name to its filename

end tell

on error errText number errNum

display dialog "Error: " & errNum & return & errText & "Trying again"

try

delay 2

tell im

set its name to its filename

end tell

on error errTexttwonumbererrNumtwo

display dialog "Skipping image due to repeated error: " & errNumtwo & return & errTexttwo

end try

end try

end repeat

end if

end tell

-- display dialog "Done"

return "Done"

Apr 18, 2015 6:54 AM in response to thedatadude

OK, now that I seem to have this working well, I wonder if somebody might be able to help me out with a script that removes the file extensions from the titles?

Nov 28, 2015 10:30 PM in response to léonie

Have you enabled the titles to show in the "View" menu in Photos? "View > Metadata"?

User uploaded file

The titles will show in the "Moments" below the photos.You can see the original filenames in the Info panel for a photo.

User uploaded file


Hi leonie,


I have been holding off changing from Aperture because I had gotten advice that Photos was not capable of showing Keywords underneath the thumbnails. When I look at your post above, I get the impression that Photos is capable of showing Keywords under thumbnails.


For my engineering and scientific work, I MUST be able to display Keywords under the thumbnails. Can Photos do this ?


Please straighten me out.

Apr 9, 2015 9:21 AM in response to thedatadude

Photos does import the filename -- it is visible in the Info window -- but the problem is basically that a filename of a photo doesn't really have anything to do with its title. (The title field is metadata stored within the photo file itself, while the filename is stored in the file system.) iPhoto displays the file name (less its extension) if the title metadata field is empty & supports searching on it; Photos does neither.


So what you need is a practical way to add the filename to the title field of the photo if you are to continue using your organizational scheme in the Photos app. This should be doable using Applescript with either iPhoto (before importing the photos into Photos.app) or afterwards with the Applescript support built into Photos.app. However, I do not have the time right now to write such a script myself (& I'm too rusty on Applescript to do it quickly even if I did) but I think someone will begin publishing scripts for this & similar needs in the days & weeks to come.


If you can't wait for that, it might be worth asking for help in the ASC Applescript forum, or in any of the other Applescript-oriented support sites on the web.


EDIT: I said that Photos doesn't support searching on a file name. I was wrong about that -- it does -- but that isn't of much help with this issue.

Apr 9, 2015 3:45 PM in response to stephenfromencinitas

I have to retract my JPEG vs. RAW issue with titles. This is what happens when you try to generalize your first view of a 50,000+ image library conversion.


BUT, I do have an issue where Photos has assigned the filename to the title field for some of my images while leaving it blank for others. If I look at the same images in Aperture the Title field in the General info data is blank in both cases.

Apr 9, 2015 3:54 PM in response to léonie

léonie wrote:

That is clearly a bug.

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


But titles & filenames are actually two very different things. For example, photograph files may have title information embedded in the photo file itself according to at least six different standards. The filename is not actually part of the file. It is a characteristic of the file system of the device storing the photo file. As a consequence, changing the filename (for instance, in the OS X Finder) will not change the title of the photo, nor will it create one if that info has not been embedded in the file.


Unfortunately, iPhoto obscures this difference because in the absence of an embedded title, it will display the filename of the photo. If you edit that displayed name from within iPhoto, it does become the title, but it does not change the filename of the original or embed it in that file. (That's why the export workaround mentioned by thedatadude does not work if the export kind is set to Original.)


I don't own Aperture or know how it works but my guess is it embeds the "version name" in the file itself, probably according to the IPTC or XMP standard.


Anyway, the problem is Photos does not display the filename as if it was the title like iPhoto does, nor does it have any builtin feature that will copy the filename to the title. That isn't a bug per se, but it definitely is a problem for those who have been relying on filenames to create more meaningful photo titles.


As I mentioned in a post earlier today, Applescript may offer a way to do this. I have spent a little time since then investigating that possibility & it looks promising: the Applescript "media item" object in Photos has a writable name (title) property & a read-only filename one, so at least in theory it should be possible to write a script that runs through every "media item" object & replaces any with a "missing value" name property with some form of the filename one.

Apr 9, 2015 4:17 PM in response to R C-R

But titles & filenames are actually two very different things.

That is clear, R C-R.

But, if I understood thedatadude correctly, the edited title contains intentionally the original filename including the filename extension as part of the title, in addition to a further comment. I am doing the same; the photo titles I assign include the full filename plus extension, because the file format of the photo is to me as important as the content of the photo. The edited titles are missing, because Photos seems to mistake them for the original filenames.

Apr 9, 2015 4:45 PM in response to léonie

léonie wrote:

But, if I understood thedatadude correctly, the edited title contains intentionally the original filename including the filename extension as part of the title, in addition to a further comment.

But if the filename was edited in the Finder, doing that won't add an embedded title to the file. And if it was done in iPhoto, it still won't add one to the original photo file, only to a file exported in a file format iPhoto supports embedding the title in. Apparently, iPhoto only supports that only for the jpeg format.


In general, iPhoto won't change anything in the original file (the 'master' file in the iPhoto Library package if the 'import into iPhoto' preference is used or the file in its original location in the file system if it is not). Normally, that is a desirable feature, since it preserves the integrity of the original no matter how it is edited. In this situation, it is not.

Apr 9, 2015 5:07 PM in response to R C-R

But if the filename was edited in the Finder, doing that won't add an embedded title to the file. And if it was done in iPhoto, it still won't add one to the original photo file, only to a file exported in a file format iPhoto supports embedding the title in. Apparently, iPhoto only supports that only for the jpeg format.

That is not the original question. When we migrate from iPhoto or Aperture to Photos, the titles we added to the photos as metadata tags using the annotation tools (batch change, Info panel) in iPhoto or Aperture are supposed to be migrated, just like the captions.

But as clearly shown by the OP, Photos removed titles that have been added this way - all added titles that look syntactically like filenames, because the title contains a filename extension.

I call that a bug, if Photos is performing censorship on the titles we add to our photos and suppresses certain titles.

Apr 9, 2015 5:49 PM in response to Washington Apples

I have this similar problem with organizing photos too. I have thousands of photos suppose to be sorted by title, so browsing in an event / album will be better of.

iPhoto set filename as title automatically, but title is missing in Photos. I aware that title is part of metadata, but I still need an easy way to batch set title to all photos.

The easiest way in iPhoto, is batch changing filename, so when importing, filename will be set as title automatically. But Photos works differently.

Manually set title in thousands of photos collection is not practical.

If anyone know any way or scripts to convert filename to title metadata or batch change title for Photos, it would be great and should be a very useful tool for everyone too. So, I'm looking forward for any reply.

Apr 11, 2015 7:39 PM in response to thedatadude

Worse than that - all of my iPhoto albums are now one album of 50 gigs of photos!!!! Ten years of photos in one album. I am expected to now divide all those photos into the albums they were in before. I don't think so! What use is a piece of software that undoes all the work I have done before? Not even a toy. Useless.


As for photo names in iPhoto - I discovered very early on that iPhoto didn't really change the file name so I always rename the file before I import it. There is no other way to ensure that the name of your photo in iPhoto is actually the name of the file. Sorry. It's one of the many reasons I have never used iPhoto as my photo editing tool.

Apr 11, 2015 10:04 PM in response to thedatadude

I am having the same issue. In my case I scanned over 9000 old family photos, negatives, transparencies etc. and had the scanner software assign file names that started with the year the picture was taken. This allowed me to find the pictures by year, and then, using iPhoto's batch change function I was in the process of assigning new creation dates that reflected the actual year and month the picture was taken, rather than the date when it was scanned. All of these file names now show as "untitled". The original file name is now listed in info, and is unavailable for sorting. It makes me wonder who was doing the beta testing, obviously someone who assumed all of the pictures would be original digital photos. Definitely a bug that needs to be fixed!

Apr 12, 2015 8:52 AM in response to léonie

léonie wrote:

But as clearly shown by the OP, Photos removed titles that have been added this way - all added titles that look syntactically like filenames, because the title contains a filename extension.

I have been doing some more checking over the last few days, & I am now reasonably certain that every photo that actually had a filename extension in its title in my iPhoto library also has it in the title imported into Photos.


By "actually," I mean that I confirmed that iPhoto was not using the filename as a substitute for the title if the photo lacked one. Sine that is difficult to determine just by looking at what iPhoto displays as the title, I wrote a short Applescript to compare iPhoto's title & image filename properties for every photo in the entire iPhoto library. I am fully confident the list it generated contains all the photos that actually have a title in iPhoto; however, since I only manually checked some of the photos on that list in Photos, I cannot say I am 100% confident they all preserved the title info.


But every one I checked did. That was about 50 out of 289 photos, including some with jpeg, png, psd, & even pct extensions, so if there really is a bug, I strongly doubt it is directly related to filename extensions.

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.

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.