replacing periods in file names with automator

bpetruzzo

macrumors regular
Original poster
Oct 22, 2005
102
0
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?
 

MaskingTape

macrumors regular
Jan 9, 2009
116
1
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.
 

Attachments

Comment

miles01110

macrumors Core
Jul 24, 2006
19,261
31
The Ivory Tower (I'm not coming down)
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.
GGJ wins again at reading, although a Name Mangler droplet in the Dock seems like it would do just fine.
 
Comment

GGJstudios

macrumors Westmere
May 16, 2008
44,419
767
... although a Name Mangler droplet in the Dock seems like it would do just fine.
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!
 
Comment

bpetruzzo

macrumors regular
Original poster
Oct 22, 2005
102
0
Thanks for the input folks.

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.
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.
 
Comment

Similar threads

  • charbear13
0
Replies
0
Views
283
  • Photostat
22
Replies
22
Views
2K
  • BasilFawlty
2
Replies
2
Views
559
  • pstoehr
0
Replies
0
Views
331
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.