replacing periods in file names with automator

Discussion in 'Mac Apps and Mac App Store' started by bpetruzzo, Dec 16, 2009.

  1. bpetruzzo macrumors regular

    Joined:
    Oct 22, 2005
    #1
    My father is used to a computer system that is a little dated. He's always naming files with underscores and periods. When I get my hands on the files, I want them to be renamed so that they'll play friendly with my applications.

    I'm looking for a way to create an Automator service that I can use to rapidly replace periods with spaces or dashes. I have the JuneBug actions which comes close, but it won't replace periods. I know I could use Name Mangler, but I have to do it so often, I'd really really like to get it onto the Mac OS services context menu and save myself a lot of clicks in the future.

    So, I'd like automator to take this:

    family.2002.sandiego.jpg

    and turn it into:

    family-2002-sandiego.jpg

    Anyone know how I can do that with Automator?
     
  2. MaskingTape macrumors regular

    Joined:
    Jan 9, 2009
    #3
    This should work. Throw it in your services directory under yourname/library/services
    (you are running snow leopard right)?
    Then just right click the file and click on Rename (it MIGHT show up as Test, if it does.. my bad lol)

    You can double click on it to load it up in automator to see what it does.
     

    Attached Files:

  3. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #4
    GGJ wins again at reading, although a Name Mangler droplet in the Dock seems like it would do just fine.
     
  4. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #5
    That's exactly why I recommended it. No need to use Automator to accomplish this. It just takes getting familiar with Name Mangler's capabilities. Create a droplet, then select files, right-click > Open with > NMdroplet.app. Done!
     
  5. bpetruzzo thread starter macrumors regular

    Joined:
    Oct 22, 2005
    #6
    Thanks for the input folks.

    This was exactly what I was looking for. Saving it as a service let me add it directly into the right-click context menu and there's no need for extra applications or steps. This means I may also be able to work it into an automatic folder action in the future.

    MaskingTape, thanks for going through the extra steps to show me how to do it.
     
  6. MaskingTape macrumors regular

    Joined:
    Jan 9, 2009
  7. synth3tik macrumors 68040

    synth3tik

    Joined:
    Oct 11, 2006
    Location:
    Minneapolis, MN
    #8
    The beauty of the underscore is known when running from the command line.
     
  8. philsurmac macrumors newbie

    philsurmac

    Joined:
    Dec 7, 2009
    Location:
    Montpellier, France
    #9
    Old post sure, but ABSOLUTELY needs to thank for this service menu !!
     
  9. mgroot macrumors regular

    mgroot

    Joined:
    Jul 25, 2014
    #10
    You can now just do this in the finder...
     

Share This Page