The other day I received four files, all named like this:
Auckland poster.pdf. I needed to change their name to be like this:
Auckland-LCB.pdf. There were only four of them so that was easy to do, but in the past I’ve had to do a similar thing for dozens or even hundreds of files at a time.
In earlier times I bought and used a magnificent piece of software, A Better Finder Rename (US$39.95), which made this easy. I could rename hundreds of files in one click and the software paid for itself in a couple of minutes.
Another way I could have done this would have been to spend hours learning how to write an Applescript. Now, though, I’m running Mac OS X 10.4, Tiger, which has a new feature called Automator. The purpose of Automator is to take the hard work out of repetitive actions. After all, a boring and repetitive task such as renaming files is exactly what a computer is perfect for.
So, instead of just renaming those four files I created an Automator workflow to do it for me. Click the thumbnail image for a larger version.
Create an Automator workflow
Open Automator and think about what you need to do. In my case, all the files were in one folder. I needed the Finder to find all the relevant files for me — they all had
poster in their name — and then remove the text I didn’t want and replace it with the text I did want.
Step 1: find the files
In the blank Automator window click on
Finder in the list of applications and drag
Find Finder Items action from the list in the middle into the workflow area on the right. Next use the pop-ups and the text fields to set it to find all files in the relevant folder whose name contained
poster. Step 1 done.
Step 2: change the name
Step 2 is to change the name. Drag the
Rename Finder Items action from the middle list into the workflow area and position it below the previous action.
Automator kindly asks if you want to simply rename files or perhaps add another action to make a copy of the files and rename them. In my case, I chose
Don't Add so it would just rename the originals.
Choose the settings you need from the pop-ups and press the Run button at the top of the window. Task completed.
Save the automator workflow
Instead of hours spent learning Applescript I spent two minutes creating an Automator action. I like this!
One final point — you may need to do this same task again and again — perhaps each week you receive a new set of files which need the same renaming action. It would be handy to save this set of instructions.
Go to the File menu and choose Save. Pick a filename and save the workflow in a place where you can find it again. Next time you need to do this same action just run the workflow.
My example was small, but you can compile long lists of actions which go across several programs. Just imagine all the boring tasks your computer can do while you relax with a fruit juice and a good book!