Batch Rename Files Mac OS X Finder?
In this article
Yes, you can batch rename files directly in the macOS Finder without any third-party software. The built-in Rename Items feature (available since OS X Yosemite) lets you rename multiple files at once using formats like Replace Text, Add Text, and Format, all from a simple context menu.
Where the Finder's Rename Tool Lives
The feature is tucked away but easy to reach once you know where to look. Select two or more files in any Finder window (hold Command to click individual files, or drag a selection box around a group), then right-click (or Control-click) one of the selected files. In the context menu that appears, click Rename X Items (where X is the number of files you selected). A small drop-down panel appears at the top of the Finder window with three modes: Replace Text, Add Text, and Format.
You can also trigger the same panel by selecting the files and pressing Shift + Command + R (a shortcut added in newer macOS versions), or by holding the Option key and clicking the File menu to reveal the "Rename X Items…" option. If you don't see the option, make sure you have more than one file selected — it won't appear for a single item.
How Each Rename Mode Works
The three modes cover nearly all common bulk-renaming needs. Understanding each one helps you pick the right approach without trial and error.
- Replace Text: Finds a specific string in every filename and swaps it for another. For example, replacing "DSC" with "Holiday" turns DSC_001.jpg into Holiday_001.jpg. You can leave the replace field empty to simply remove the text entirely.
- Add Text: Appends text to the beginning or end of every filename. For instance, adding "_final" to the end of report.pdf gives report_final.pdf. This is useful for versioning or adding a prefix like a project code.
- Format: Renames files with a custom base name plus a counter or date. You choose a name (e.g., "Vacation"), a number starting value (e.g., 1), and a format like Name 1, Name 001, or Name 2025-01-15. This is the mode to use when you want a clean, sequential series.
One important detail: the Format mode preserves the original file extension (like .jpg or .pdf) automatically. You never need to type the extension yourself, and the Finder will warn you if you try to change it manually in the Replace mode.
What Happens to File Extensions and Duplicates
By default, the Finder treats the extension as separate from the name. In Replace Text mode, if you type ".jpg" and replace it with ".png", the Finder will actually change the extension — but it will also show a warning dialog asking you to confirm, because changing the extension can make the file unopenable. In Add Text and Format modes, the extension is never touched.
If your new names would create a duplicate (for example, renaming a.txt and b.txt both to c.txt), the Finder will automatically append a number in parentheses to the second file: c 2.txt. It does not overwrite existing files, so you don't need to worry about data loss from collisions.
Common Problems and How to Avoid Them
The most frequent issue people hit is accidentally renaming files in the wrong order or with the wrong counter start. Since the Finder applies the rename immediately (there's no preview), it's wise to test on a couple of copies first. Another common mistake is using Format mode when you only wanted to add a prefix — you'll end up losing the original names. To avoid that, always double-check which mode is selected before clicking Rename.
If you make a mistake, press Command + Z immediately. The Finder supports undo for batch renames, but only if you haven't done another operation in between. If you've already closed the window or done something else, you may be out of luck — there's no built-in "revert" for renames.
Also note that the Finder's rename tool works on files in the same folder only. It cannot recursively rename files in subfolders. For that, you'd need a third-party tool or a Terminal command.
When to Use Terminal Instead
For power users, the rename command (available via Homebrew) or a simple for loop in Terminal offers far more flexibility. For example, to add a prefix to all .txt files in a folder, you could run:
for f in *.txt; do mv "$f" "prefix_$f"; done
This is faster for very large batches (thousands of files) and allows regex-based replacements that the Finder can't do. However, it requires care — a typo can rename files in ways you didn't intend, and there's no undo. If you're not comfortable with the command line, stick with the Finder's built-in tool.
How to Choose the Right Method
For most people, the Finder's Rename Items is sufficient. Use Replace Text when you have a consistent string to change (like a date or camera prefix). Use Add Text when you need to tag files with a version or category. Use Format when you want a clean numbered series, like for scanning documents or organizing photos.
If you need to rename files across multiple subfolders, or if you need complex pattern matching (e.g., swapping the position of two parts of a filename), then a dedicated batch rename app or Terminal is worth learning. For occasional use, the Finder tool is free, fast, and doesn't require installing anything.
Frequently Asked Questions
Can I undo a batch rename in Finder?
Yes, press Command + Z immediately after the rename. The undo works as long as you haven't performed another action in the Finder. It's a single-level undo, so you can't step back through multiple renames.
Does the Finder rename tool change file extensions?
Only in Replace Text mode if you specifically include the extension in the search string. The Finder will warn you before applying. In Add Text and Format modes, extensions are preserved automatically.
Why is the Rename option grayed out?
This happens when you have only one file selected, or when you're in a view that doesn't allow multiple selection (like some list views with sorting). Make sure you have at least two files selected, and try clicking on the background first to deselect, then re-select.
Can I rename files in subfolders at once?
No, the Finder's built-in tool only renames files in the current folder. It does not recurse into subfolders. For that, you'd need a third-party app or a Terminal command like find . -name "*.txt" -exec rename ....
Is there a way to preview the new names before applying?
No, the Finder doesn't offer a preview. You can test on a few files first, or use a third-party app that shows a preview. Alternatively, copy the files to a temporary folder and experiment there.
Does the rename tool work on folders as well as files?
Yes, you can select multiple folders and rename them the same way. The same rules apply — extensions aren't relevant, and duplicates get a numeric suffix.