How To Use Automator To Batch Rename Images on Mac
I have had this problem many times in the past – I am developing a website for a client and when I ask them to send me images, for something such as a gallery, they’ll send me lots of images and the name for each image wont have any meaning — something along the lines of IMG_0839 or CIMG_1029.
It’s nice to at least have the image files named like image1, image2, image3, etc so that you can at least order them. Luckily for us Mac OS X users, we have a nice little tool that Apple has developed called Automator which makes such a batch rename task a breeze.
Open up Automator by going to your Applications folder and then double click Automator to open it up. Alternatively you could use Spotlight or to open up the Application.
When Automator has loaded up you will be presented with a window similar to the one pictured below.
From here, select Custom and ht the Choose button to begin creating your workflow.
First, search for Get Specified Finder Items or click Files & Folders under Library and then select the action from there. When you have found it, drag and drop it to the right to add it to the workflow. Leave the field empty for now.
Next, search for rename in the search field at the top of the Application.
When you have found it, drag and drop it to the workflow. An alert box will pop up asking you if you would like to add a ‘Copy Finder Items‘ action to the workflow. Click on Add to add the action. All it does is duplicate the items to be batch renamed, serving as a backup in case things go wrong and leaving the original files intact. Choose a suitable destination for it — a new folder on the desktop should be perfect.
Your workflow should look like the one below.
There is one last thing I am going to change and that is within Rename Finder Items. I am going to change Add Date or Time to Make Sequential. Also change Add number to to new name, set this to whatever you like, I have named it image. Make sure that you tick Make all number 2 digits long so that when you reorder the images the ones that are image_2 will come before image_11.
We are all done.
Save the workflow as a batch rename application by going to the File menu and choose ‘Save As…’ Enter a name for it, like “Rename to Sequential” and select ‘Application’ for the file format and save it somewhere obvious, the Desktop, perhaps. To rename your images, simpley drag them over the icon and release. Automator will spring into life, copy and bulk rename your images, and save them to the destination you specified in the workflow.
If it is successful it should have copied all the images and renamed them image-1, image-2, image-3 and so on in the folder that you chose.
I went from this :
to this with a nice, simple workflow.
The advantage of saving the workflow as a batch rename application is you can use it over and over again. If you need to change the settings in the workflow, open the “application” in Automator.
There is a bulk rename utility for Mac OS X called NameChanger that is similar to what we have just done. But its nice to know that there are alternatives, for example if you don’t have an internet connection and can’t download NameChanger.
This has been a workflow that has came in useful for me on a number of occasions. Share your workflows with us and our readers in the comments below.
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.