Automator Help...

Discussion in 'Mac Apps and Mac App Store' started by Locker, Feb 5, 2008.

  1. Locker macrumors 6502

    Aug 22, 2007
    Staffordshire, UK
    I'm trying to create a workflow in Automator which will basically:

    - Fetch new email messages
    - Filter the messages so only ones with a certain sender come through
    - Take the attachment from these and save it in a folder

    The following workflow works perfectly for it:

    - "Get New Mail"
    - "Find Accounts in Mail"
    - "Get Attachments from Mail Messages"

    However, I have one problem! All of the attachments will have the same name (photo.jpg because they'll be sent from an iPhone). So, once it's copied the first attachment over to a folder, it errors... due to the fact that a file of that name already exists. How can I get it to save the attachments as 1.jpg, 2.jpg, 3.jpg etc. - or is there another method to achieve what I want to do?
  2. iCeFuSiOn macrumors 6502a

    Jul 18, 2007
    I'm not sure, but there should be an Automator action for renaming. You could try to get it set up so that it appends the date or time to each attachment being saved.
  3. Locker thread starter macrumors 6502

    Aug 22, 2007
    Staffordshire, UK
    That was my first thought, though the "Get Attachments from Mail Messages" action saves the images to your defined destination all in one go - there's no in-between space to add a renaming action.
  4. numlock macrumors 68000

    Mar 13, 2006
    what if you would create a folder action that renamed every item added to that folder?

    You would though either have to move the pictures to another folder or have automator somehow filter through the already saved pictures so they arent renamed endlessly
  5. cap10subtext macrumors newbie

    Feb 11, 2009
    did you ever figure this out!?

    This same thing is driving me nuts!! You'd think there'd be a more elegant way to use this get attachments action, if even two of the items have the same name it won't save to any folder, it just fails, so there's no way to rename them. Grr! Frustrating.

    I'm literally trying to do the same thing you are, photos from an iphone labelled 1.jpg, 2.jpg, 3.jpg.

    Anyhow, let me know if you cracked this or if you have an applescript that does the trick!
  6. shouldve macrumors newbie

    Feb 25, 2009
    Any answer yet?

    Has anyone come up with anything yet? I have the same problem, and I'd love to add the date and time the mail was sent to the photo name as they're saved. I can't find an answer anywhere, so I'd really appreciate some guidance. Thanks!

Share This Page