Michael654321

Q: Is it possible to use Automator to change the filename of a photo?

I use a very specific file naming system for photos that I import from my Mac (e.g. "2015-06-01 at 12-33_45" for the original image, and "2015-06-01 at 12-33_45 (01)" for the first edited version of that image). The trouble I am having is that any photos taken on my phone get filenames that do not match my system. Is there a way, say using Applescript or Automator, to change the actual filename of a photos within Photos (not just the title)? Ideally, I could set it to the image's title which I would set to be the name I wanted.

 

Thanks

MacBook Pro (Retina, 15-inch, Mid 2014), OS X Yosemite (10.10.3)

Posted on Jun 7, 2015 2:04 PM

Close

Q: Is it possible to use Automator to change the filename of a photo?

  • All replies
  • Helpful answers

  • by LarryHN,Apple recommended

    LarryHN LarryHN Jun 7, 2015 2:11 PM in response to Michael654321
    Level 10 (85,552 points)
    Photos for Mac
    Jun 7, 2015 2:11 PM in response to Michael654321

    No

     

    No changes of any sort can be made to the content of the iPhoto or Photos library - it will corrupt the database and you will lose data

     

    And there is no "edited" photos there in any case - edits are recorded in the database and applied when you view the photos or export it (there is a preview for use by other programs showing the current photo) - the original is kept intact with no changes at all times

     

    Photos is not abut files, it is about photos and the user does not have access to the files except by exporting - similar with some different options to exporting from iPhoto - Exporting From iPhoto

     

    LN

  • by Michael654321,

    Michael654321 Michael654321 Jun 7, 2015 2:43 PM in response to LarryHN
    Level 1 (0 points)
    Jun 7, 2015 2:43 PM in response to LarryHN

    Thanks for the quick reply, Larry. Aperture allows changing of the filename, so I was hoping there might be a way of replicating that with Applescript in Photos. I guess it would have to both change the filename and inform the Photos database of that change. As for edited photos, I use that with photos edited in other programs which actually create new files. Some apps will change the creation date which causes the original and edited photos to be disassociated. In Aperture, I will change the creation date of the edited photo to match the original photo's date, and change the filename of both to match the created time, adding an "(01)" for the edited file. This keeps everything accurate and perfectly chronological. And should a creation date ever get changed, it's easy to see what it should be.

     

    So, is my only option to export the photos, change the filenames, and then reimport them?

     

    Michael

  • by R C-R,Apple recommended

    R C-R R C-R Jun 7, 2015 3:09 PM in response to Michael654321
    Level 6 (17,700 points)
    Jun 7, 2015 3:09 PM in response to Michael654321

    Michael654321 wrote:

    So, is my only option to export the photos, change the filenames, and then reimport them?

    You could just add the photos to some designated folder using an app like Image Capture instead of using Photos for that, rename their filenames in that folder to whatever you want, & then import them from that folder into Photos.

     

    You could automate some or most of this process by creating a folder action for that designated folder to trigger an Applescript or Automator workflow to change the filename (which would require other scripts or Automator actions to get the date-time stamp of the file & convert it to the desired format). You could even automate the import into Photos, using either a custom Applescript action for that, or with this third party Actions for Photos bundle. Regarding that, you might find the "Hot Folders" example from that site useful as a general guide for how to create the Automator workflow.

  • by Michael654321,

    Michael654321 Michael654321 Jun 7, 2015 3:28 PM in response to R C-R
    Level 1 (0 points)
    Jun 7, 2015 3:28 PM in response to R C-R

    Thanks R C-R. This is very similar to my current workflow where I use Image Capture to save images to a folder that Hazel watches. Hazel then checks for EXIF data, and renames and files the photos. This (and your solution) works great for photos originating from the Mac – from email, or using Image Capture to download from the iPhone or other camera – but I’m thinking about photos that sync automatically from the iPhone (and that the iPhone will give its own filenames to). I wouldn’t mind only using Image Capture to GET photos from the iPhone, but I would like to access all my iCloud photos ON the iPhone. Do you know if it’s possible to turn off auto uploads from the iPhone, while turning on auto uploads from the Mac?


    Michael

  • by R C-R,

    R C-R R C-R Jun 7, 2015 3:59 PM in response to Michael654321
    Level 6 (17,700 points)
    Jun 7, 2015 3:59 PM in response to Michael654321

    There are two "auto upload" iCloud services, "My Photo Stream" & "iCloud Photo Library," that can be enabled or disabled on a device by device basis, plus the subscriber-based Photo Sharing one. It might be possible to selectively enable one of them on a 'master' Mac & somehow use the others, along with the Mac workflows, to do what you want, but I suspect this would be a convoluted, impractical method at best.

  • by Michael654321,

    Michael654321 Michael654321 Jun 7, 2015 5:35 PM in response to R C-R
    Level 1 (0 points)
    Jun 7, 2015 5:35 PM in response to R C-R

    Thanks, R C-R. So in your previous reply, were you thinking the auto synching features would be turned off, and I would only add photos from the iPhone manually via Image Capture?

  • by R C-R,

    R C-R R C-R Jun 7, 2015 8:14 PM in response to Michael654321
    Level 6 (17,700 points)
    Jun 7, 2015 8:14 PM in response to Michael654321

    So in your previous reply, were you thinking the auto synching features would be turned off, and I would only add photos from the iPhone manually via Image Capture?

    I was thinking that since you can't change (or even see) the filenames an iPhone assigns to the photos it takes, it doesn't matter what the filenames are while they are still on the iPhone, only what they are when you import them into the Mac, where you can use tools like Applescript & Automator to change them before importing them into the Photos Library.

     

    If you are going to use iCloud services to sync a Mac Photos Library & an iPhone's photos, & you change the filenames, you obviously are going to run into difficult to solve problems with duplications (same photo stored under two different file names), which is why I said this would be impractical.

  • by Michael654321,

    Michael654321 Michael654321 Jun 7, 2015 10:42 PM in response to R C-R
    Level 1 (0 points)
    Jun 7, 2015 10:42 PM in response to R C-R

    Yes, that makes sense. Thanks for your thoughts on this. Frustrating that filename management and sync seem mutually exclusive.

     

    Michael