Returning from a holiday or a corporate event usually leaves you with a folder containing hundreds of photographs or documents with completely useless, generic file names like IMG_4091.jpg or Scan_001.pdf. Attempting to manually click, rename, and number each of these files one by one is an agonising, hours-long task. While many users instinctively download expensive, third-party utility applications to solve this problem, they are entirely unaware that Apple includes a phenomenally powerful, visual scripting tool perfectly suited for the job. Learning how to use Mac Automator to batch rename files allows you to organise massive directories in a matter of seconds.
In this advanced macOS productivity guide, we will bypass simple Finder renaming tricks and explore the Automator application. We will provide a step-by-step walkthrough on how to build a custom, reusable workflow that automatically strips generic names, replaces them with descriptive text, and appends sequential numbering to hundreds of files instantly.
What is Mac Automator?
Automator is a native macOS application designed to automate repetitive, time-consuming tasks without requiring you to write a single line of code. It uses a visual, drag-and-drop interface.
You build a “Workflow” by combining smaller, pre-programmed blocks called “Actions.” For example, you can create a workflow where Action 1 fetches a group of PDFs, Action 2 shrinks their file size, and Action 3 automatically emails them to a specific client. For our purposes, we will be building a dedicated file renaming workflow that you can save directly into your right-click context menu.
Step-by-Step Guide: Building the Renaming Workflow
We are going to build a “Quick Action.” This means that once finished, you will be able to highlight any group of files in the Finder, right-click them, and execute your custom renaming script instantly.
Step 1: Launch Automator and Select the Project Type
- Press
Command + Spaceto open Spotlight Search, type Automator, and press Enter. - A dialogue box will appear asking you to choose a type for your document. Select Quick Action (in older versions of macOS, this was called a “Service”) and click Choose.
Step 2: Configure the Input Parameters
Look at the top of the main, blank grey canvas on the right side of the screen.
- You will see a drop-down menu labelled “Workflow receives current”. Change this drop-down to files or folders.
- Ensure the “in” drop-down menu is set to Finder.
This tells Automator that this script should only activate when you have files highlighted in a Finder window.
Step 3: Add the Rename Action
Now, look at the library panel on the extreme left side of the screen.
- Click on Files & Folders in the Library column.
- In the adjacent column, locate the action titled Rename Finder Items.
- Click and drag “Rename Finder Items” into the large grey canvas on the right.
Note: A warning box will immediately pop up asking if you want to add a “Copy Finder Items” action to preserve your original files. If you want to overwrite the original generic names entirely, click Don’t Add. If you are nervous and want to test the script on duplicates first, click “Add”.
Step 4: Configure the Renaming Logic
The “Rename Finder Items” block is now in your workflow. We need to configure it to add sequential numbers.
- Click the drop-down menu in the top-left corner of the Rename block (it usually defaults to “Add Date or Time”) and change it to Make Sequential.
- Select new name from the second drop-down.
- In the text box next to “new name,” type your desired descriptive base name (e.g.,
Paris_Holiday_orQ3_Financial_Report_). - Ensure “Start numbers at” is set to 1.
- Look at the “Example:” text at the absolute bottom of the block. It will show you exactly what your final files will look like (e.g.,
Paris_Holiday_1.jpg). Adjust your spacing and underscores until you are happy with the preview.
Step 5: Save the Quick Action
Your visual script is complete.
- Go to the top menu bar and click File > Save.
- Give your new tool a descriptive name, such as “Batch Rename Sequential”.
- Click Save and close the Automator application completely.
How to Execute Your New Workflow
The beauty of building this as a Quick Action is that it is now deeply integrated into the macOS operating system.
- Open a Finder window and navigate to the messy folder containing your generic
IMG_XXXX.jpgfiles. - Highlight all the files you want to rename (press
Command + Ato select all). - Right-click (or Control-click) on any of the highlighted files.
- Navigate to the bottom of the context menu and hover over Quick Actions.
- Click on the tool you just created: Batch Rename Sequential.
In less than a second, every single highlighted file will be stripped of its generic name and flawlessly relabelled and sequentially numbered in perfect order.
Advanced Automator Workflows
Once you understand the basic logic of Automator, you can modify this script to perform highly complex operations:
- Text Replacement: Instead of “Make Sequential,” change the action block to “Replace Text.” This is perfect if you need to bulk-remove a specific word (like “Draft_”) from fifty different PDF titles simultaneously.
- Change Case: You can configure the block to instantly format hundreds of messy file titles into strict lowercase or uppercase lettering, which is crucial for web developers ensuring URL compatibility.
Relying on tedious manual data entry or paying for third-party file managers is entirely unnecessary when you already possess the ultimate productivity tool. By learning how to use Mac Automator to batch rename files, you turn a mind-numbing, hours-long chore into a single, deeply satisfying click of the mouse.