Batch Renaming Groups of Files in Mac OS X with a DIY File Renamer Tool
If you need to rename a group of files on a Mac by appending some text to each files name, a great free option is to use a simple Automator action and save it as an application. This is similar to the other Automator utilities we have built and covered here before, but this time around the end result is an OS X application that lets you rename a file, multiple files, or a group of many files by adding some predefined text into the file name, all with the same Finder-based drag and drop simplicity of usage. If you have tons of files to rename, you’ll find this is much better than renaming them yourself in the Finder or through the title bar.
If you’re unfamiliar with Automator and creating Automator applications in OS X you’ll find the process to be quite simple, so just follow along and you’ll have a simple working app to rename files in no time at all. Due to the simplicity and general user-friendliness of this specific usage of Automator, advanced users may prefer this command line method of renaming files instead. Of course, this Automator action could also be modified heavily to be made more complex, handle additional file functions like resizing images at the same time, or rename with wildcards and incrementing, but for this specific article we’re aiming to keep things easy and accessible to everyone, even novice users who are new to scripting and automation. On we go!
Make a Simple Batch File Renaming App for Mac OS X
This is going to create a small application that appends text to every file dropped onto it, effectively renaming the file by adding another specified text item into the files existing names. For example, if you have a group of files named sample1, sample2, sample3, dropping them into this application would rename them all to sample1-renamed, sample2-renamed, and sample3-renamed, respectively.
- Launch “Automator”, found within the /Applications folder of OS X
- At the splash screen, choose to create a new “Application”
- Use the search box to look for “rename”, then select “Rename Finder Items” and drag that to the workflow panel
- Choose “Don’t Add” when asked (unless you want to make a copy of every file you rename, that’s your call but not what we’re aiming for here)
- Under the ‘Rename Finder Items’ option, pull down the submenu for “Add Date or Time” and choose “Add Text” instead
- Specify the text you want to add to the file name(s) that run through the app, in this example we’re adding “-rename” to the file name but you will obviously want to pick something more in line with your needs
- Now go to “File” and save the app, name it something like “Renamer” and put it somewhere that you’ll find it easily, like the Desktop
That’s all there is to it. You have built a simple app that will rename whatever files you direct to the application. Next, let’s test it out.
Batch Renaming Multiple Files with a Drag & Drop
Now you can try the batch renamer app out by dragging and dropping any file(s) you want renamed onto the application. This simple DIY app will handle as many files as you throw at it, so whether it’s a small block of files you need to append some text to the names for, or a huge folder of thousands of files you want to rename, it’ll do the job. Of course with huge batch processes of hundreds or thousands of file renaming, it will take a bit longer, so give the Mac time to complete the task.
Try it out yourself by selecting a file or multiple files and dropping them onto the renamer tool you just made.
To be completely clear, anything dropped onto this application will be renamed according to the added text specified in the aforementioned steps. If you want the renamed text to say something else, you’ll need to edit the application again through Automator and save it.
There are certainly more complex ways to handle renaming files, whether it’s using more complex actions in Automator, or using third party tools like Name Mangler or NameChanger, but for something truly simple and free, this basic Automator app does the job.
Having fun with Automator? Be sure to check out some other interesting and powerful things you can automate throughout OS X using the bundled app on every Mac.