There are lots of reasons why you would want to rename files in a sequential order. One example: most people like to rename their photos in sequence, rather than being stuck with something that begins with "IMG_". For me, I like my files to begin with "kevin-", with a series of sequential numbers following the prefix (i.e.: "kevin-001", "kevin-002", etc). That way, it's easy to distinguish my photos from others'.
So the question is not IF I rename my files, but rather HOW I rename my files. Sure, you can take a painstaking, manual approach to this, but it will kill your fingers/wrists and wear out the keys on your keyboard faster than you want to. Another approach would be to purchase expensive software to make it easier. There's a third option... and it's simple and absolutely free.
Automator is a great utility that comes pre-installed on every Mac. It's a utility that allows you to easily make small apps (or "workflows") to help automate certain tasks. Renaming a series of files in a sequential order is one of many reasons to use Automator.
First, let's open Automator. I open it from Mission Control, but you can also open it from Finder by going to Applications. The icon looks like this:
Once you have opened Automator, it will ask you what kind of document you want to create. For this particular exercise, we will want to choose "Workflow".
After we have chosen to create a new "Workflow" document, we are presented with a blank canvas. This canvas is where we will start to build our workflow. Keep in mind that a workflow is nothing more than a series of steps that build on top of each other. For example, before we leave for work in the morning, our workflow may look like this:
- Wake up
- Shower
- Get dressed
- Eat breakfast
- Brush teeth
- Leave
Now this may be over simplistic, but it helps to illustrate my point. In this exercise (renaming files), there's really only two steps: 1) locate files to rename and and 2) rename the files. It may seem backwards at first, but we're going to add step 2 first... rename files. To add this step, we will search for "rename" in the list of available actions on the left. Once we find this action, we will simply drag and drop it onto our canvas.
Automator is smart enough to realize what we're doing here, and will now ask us if we want to automatically add another step that will copy of the files to another location first (it knows that once we rename our files, we can't go back to the original names).
In this case, we're going to choose NOT to add this step, because we know exactly what we're getting ourselves into. Now that we have our renaming action on our canvas, it's time to begin customizing it for our need. Take a minute to review the options available to you here, and choose those options that make most sense for what you're trying to accomplish.
Now that we have customized the action to best suit our needs, it's time to add the first step... locating the files to rename. Doing this is simple. In my example, I have 28 image files that I want to rename. I simply highlight the 28 files in Finder, then drag and drop them BEFORE our rename action in Automator.
Once the files are listed as the first step in our Automator workflow (followed by the rename action), it's time to run the Automator workflow. Doing this is as simple as hitting "Run". No, really... all we need to do is hit the "Run" button in the top right corner of Automator.
When you run your first Automator workflow, you will see just how fast the workflow is. In this case, it takes about 1 second to rename all 28 files (much faster than running through it manually, for sure!). When all is said and done, this is what your files will look like:
If you're in the mood for a little tech adventure, this is where you can explore the option of turning this workflow into an app or folder action to even further the automation possibilities!!
For those who prefer to learn through video, here's a video walking you through the process: