JustinThyme Systems -- Home
iPhotoSerialNamer 0.3
Description | Usage | Download | Release History | Plans/Suggestions | FAQ

Announcement of Obsolecence:

The new version of iPhoto, iPhoto'04 from iLife'04, accomplishes what this script does and more, most importantly, it also allows you to batch set the date, with clever name & timing serialization. Consequentially, iPhotoSerialNamer will no longer be actively developed. I have, however, teseted it with iPhoto'04 and it does work.

Apple has not added the ability to rename the files themselves, nor to produce files which are named in accordance with the titles of the images when you drag thumbnails to drop targets like the desktop or the Mail.app icon in the Dock, so of course those features aren't scriptable. They have, however, done a simply extraordinary job of scaling iPhoto up in raw performace, and adding at least those features which we couldn't live without. So why don't you take the time to congratulate them on iPhoto'04 and remind them that next up, they should focus on clever imrovements to the metadata management interface, most of all allowing easy image filename renaming. See the FAQ for further discussion.

Description:

This is an applescript for giving a consistant name with serial numbering to a group of photos. It asks you for a name basis, and then gives all the images you select in iPhoto that name, followed by an underscore and a number in ascending order, i.e. "nyears2003_1", "nyears2003_2", "nyears2003_3", etc." You can specify the starting number; the default starting number is 1.

I find that the best way to use it is with Apple's Script Menu. That way you can launch the script without leaving iPhoto. For info on the Script Menu, see http://www.apple.com/applescript/script_menu/

Usage:

Select the images you would like to have named and run the script.

  • If you just want the script to take a name prefix and name the images with a numerical suffix, just enter a name and click the "OK" button.
  • If you want the numbering to start from some number which isn't 1, click the "Initial number..." button. In the resulting dialog, enter the initial number and click the "OK" button.
  • If you want to add any extra zero padding, for example, you're renaming 6 photos but you want them named photo_01 through photo_06, you have to choose "Initial number..." when you enter the title stem. In the initial number dialog, leave "1" as the number, or choose any starting number, but click "xtra 0-padding" instead of "OK". Then enter the number of digits you want each number to have; in the above case you would enter "2".

Note: If your library is very big, the script will take a while to run.

To put it in your script menu:

  1. See that ~/Library/Scripts exists.
  2. Put iPhotoSeialName.scpt into that folder.
  3. <JG>There is no step three!</JG>

Download it.

Release History

Changes in version 0.3:

  • Added smart zero-padding to the numerical suffix so the titles sorted alphabetically are in order.
  • Added check to make sure user has images selected.
  • Added facility for user-specified arbitrary amount of zero-padding.
  • Added usage to the Description section of the script.
  • iPhoto is still broken in that it won't refresh the title of the last image renamed, but now it's more broken and won't select the photo library in order to nudge it to refresh the title. So now I rename the first image again to accomplish the same thing.

Changes in version 0.2:

  • added ability to specify the initial number of the sequence.
  • deselect images after renaming -- this prompts iPhoto to update the displayed title of the last image renamed.

Initial Release, 0.1

  • asks for a name, gives selected images name with "_<index>" suffix.

Plans for the future:

These are on hold, see above.

  • Version 0.4:
    • Allow user to specify number as prefix or suffix.
    • Allow user the option of archiving the old title in the comments field.
  • Version 0.5:
    • Use AppleScript Studio to provide a sophistocated UI, instead of a succession of dialogs (this will entail me learning to user AppleScript Studio).
    • make a suggestion

Frequently Asked Question

Q: Can you make iPhotoSerialNamer rename the images' acutal filenames, instead of just changing the title of the image in iPhoto?

A: Changing the filenames is not impossible, but it's the next closest thing. It seems Apple specifically wants you to nevermind the filenames, to deal only with the titles of the images via iPhoto, and let iPhoto handle the filenames and filesystem organization. iPhoto does at least allow you to handle the files via their thumbnails. For example, if you drag a thumbnail from iPhoto over the icon of Mail.app on the dock, it will open a new mail message with the dragged image as an attachment. You can also drag the thunbmail over the Finder and iPhoto will create a copy of the image in the appropriate location.

Unfortunately, it doesn't do you the courtesy of naming the attached file with the Title you've given it, so we're back to the same problem -- you can't manage the attribute of the image which is relevent to the wold outside of iPhoto.

Even if I were to be fancy and cheat and do tricky things to actually rename the file via my script, that would then break the links that iPhoto uses to find the images. There is actually a solution, but it's so gross and disgusting and foul that I refuse to do it. The script could find the path of the file, copy it temporarily, rename the copy, delete the original image from your iPhoto library, and then reinsert the new copy with the new filename. If you want that, write it yourself. Bleh.

Your other option is to ignore my script and deal with the images before importing them. There's a nice program called R-name which is a really flush interface to giving serialized names to groups of actual files. So if you download images to your drive, run R-name on them, *then* import them to iPhoto, you will get the results you want.

However, none of this is the right solution. The right solution is for Apple to fix iPhoto so that in all interactions with the outside world, it provides filenames which match the title that you've given the image. Why don't you suggest that to apple?

ShopWiki, the best online shoping engine in the world!