The File Naming Nightmare
If you are a photographer, a graphic designer, or an archivist, you know the pain of digital imports. You dump an SD card full of photos onto your Mac, and you are staring at 500 files named IMG_4951.jpg, IMG_4952.jpg, and IMG_4953.jpg.
Leaving them with random camera codes makes them impossible to search for later. You need to rename them to Smith_Wedding_001.jpg, Smith_Wedding_002.jpg, etc. Right-clicking each file, selecting “Rename,” typing the word, and pressing Enter takes about five seconds per file. For 500 files, that is over 40 minutes of mind-numbing data entry.
You do not need to download sketchy third-party renaming software from the internet. Apple built a powerful, visual scripting tool directly into macOS specifically for this kind of file-system automation. It is called Automator, and it allows you to batch rename thousands of files in a fraction of a second.
Launching Automator
Automator is built into every Mac, though many users have never opened it.
- Press Command + Spacebar to open Spotlight Search.
- Type Automator and press Enter to launch the app.
- A window will appear asking you to choose a type for your document. Select Workflow and click Choose.
You are now looking at the Automator canvas. The left sidebar contains a list of Actions, and the right side is where you build your automation pipeline.
Building the Rename Pipeline
We are going to build a two-step script: Step 1 grabs the files, Step 2 renames them.
Step 1: Get Specified Finder Items
- In the search bar at the top of the left sidebar, type Get Specified Finder Items.
- Drag that action from the left sidebar and drop it onto the main canvas on the right.
- You will see an empty box. Click the Add… button at the bottom of this box.
- Navigate to the folder containing your 500 photos, select all of them (Command + A), and click Add. Your files are now loaded into the pipeline.
Step 2: Rename Finder Items
- Go back to the search bar on the left and type Rename Finder Items.
- Drag it onto the canvas, dropping it directly below the first action so they connect together.
- A warning box will pop up, asking if you want to copy the files first (to protect the originals). If you are confident, click Don’t Add. If you are nervous, click Add (this will duplicate the files before renaming them).
Now look at the “Rename Finder Items” action block. This is where you set your renaming rules.
Configuring the Naming Rules
The “Rename Finder Items” block has a dropdown menu at the top left. By default, it says “Add Date or Time.” Click this dropdown to see your options. The two most useful are:
Option A: Make Sequential
This is perfect for the wedding photo scenario.
- Select Make Sequential from the dropdown.
- Check the radio button for new name.
- In the blank text field, type:
Smith_Wedding_ - Ensure the “Start numbers at” field is set to
1.
If you run this, your files will become Smith_Wedding_1.jpg, Smith_Wedding_2.jpg, etc.
Option B: Replace Text
This is perfect if you have files named DRAFT_Q1_Report.pdf, DRAFT_Q2_Report.pdf, and you want to finalize them.
- Select Replace Text from the dropdown.
- In the “Find:” box, type
DRAFT_ - In the “Replace:” box, type
FINAL_
Executing the Script
Once your rules are set, look at the top right corner of the Automator window.
Click the Run button.
A green checkmark will appear at the bottom of the window in less than a second. Open your Finder window and look at your files. All 500 photos have been perfectly renamed and sequentially numbered, saving you 40 minutes of manual labor.
Conclusion
Computers excel at repetitive, algorithmic tasks. By spending three minutes dragging blocks inside macOS Automator, you can build a customized batch-renaming tool that turns an hour of tedious data entry into a single click.