tell application "iPhoto" -- this script removes automtic numbering using the format "##### - PhotoTitle of photos in an album get albums set renamedNumber to 0 set thePhotos to (photos of current album) set sizeAlbum to the count of items in thePhotos repeat with i from 1 to sizeAlbum set oldPhotoName to the name of item i of thePhotos if the (count of characters of oldPhotoName) > 7 then set numericValid to true repeat with j from 1 to 4 if item j of (characters 1 thru 4 of oldPhotoName) is not in {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"} then set numericValid to false end if end repeat if numericValid then if ((characters 1 thru 4 of oldPhotoName) as string) as integer > 0 then -- display dialog ("Photo " & ((((characters 1 thru 4) of oldPhotoName) as string) as number)) & " processed." & (the count of characters of oldPhotoName) giving up after 2 set the name of item i of thePhotos to (characters 8 thru (the count of characters of oldPhotoName) of oldPhotoName) as string set renamedNumber to renamedNumber + 1 end if end if end if end repeat display dialog "" & renamedNumber & " photo(s) renamed." giving up after 5 end tell