Batch Rename
Select several files, right-click, and choose Batch Rename…. The sheet shows a live preview of every name before and after, and nothing touches the disk until you press Rename.
Three steps, applied in order
The sheet has three numbered steps, and they all run in a single pass, top to bottom:
- Find & Replace — swap text inside the name, with wildcards or by regular expression
- Prefix & Suffix — add text before and after
- Number — append or prepend a sequence number
Leave a step blank and it does nothing, so using just one of them works exactly as you'd expect. Fill in several and they compose:
Find IMG_, replace Holiday | |
Prefix 2026_, suffix _final | |
Number on, start 1, pad 3, separator _ | |
| Result | IMG_01.jpg → 2026_Holiday01_final_001.jpg |
The order is fixed, and chosen because it's nearly always the one you want: replacing first means your search matches the original name rather than a prefix you just added, and numbering last keeps the counter clear of the other steps.
Find & Replace
Type text in Find and it's replaced wherever it appears in the name. Leave Replace empty to delete the matched text instead. Case sensitive is on by default.
Wildcards
* matches any run of characters and ? matches exactly one, without turning anything else on.
Everything else you type stays literal, and the search is still a substring search — IMG_*
finds IMG_9 inside AB_IMG_9, exactly as typing IMG_ always has.
Put a * in Replace to keep what the * matched. Find 30* and replace with 20* renames
3045.jpg to 2045.jpg — the Nth wildcard in Replace refers to the Nth in Find:
| Find | Replace | becomes |
|---|---|---|
30* | 20* | 3045.jpg → 2045.jpg |
*_* | *-* | holiday_01.jpg → holiday-01.jpg |
* | photo | IMG_0001.jpg → photo.jpg |
IMG_* | shot-* | IMG_0001.jpg → shot-0001.jpg |
Each wildcard is also a numbered capture group, so $1, $2… do the same job and are the way to
use them out of order:
| Find | Replace | becomes |
|---|---|---|
*_* | $2_$1 | holiday_01.jpg → 01_holiday.jpg |
A * in Replace with no matching wildcard in Find stays an ordinary asterisk.
Type no wildcard and nothing is interpreted at all: report (1) finds exactly that, brackets
included, and a $ in Replace is a dollar sign rather than a capture group reference.
The one thing this costs you: a filename containing a literal * or ? can't be searched for this
way. Both are legal in a macOS filename and both are rare; if you need one, Regular expression mode
finds them as \* and \?.
Regular expressions
Turn on Regular expression for full ICU pattern
matching. In the replacement,
$1, $2… insert the capture groups from your pattern:
| Find | Replace | IMG_01.jpg becomes |
|---|---|---|
^IMG_(\d+)$ | shot-$1 | shot-01.jpg |
\s+ | _ | (spaces collapse to underscores) |
[^a-zA-Z0-9._-] | (empty) | (strips anything not alphanumeric) |
(\d+) | #$1 | IMG_#01.jpg |
Here *, ? and + mean something different — they're repeat counts that apply to whatever
comes before them. \d* is any number of digits; * on its own has nothing to repeat, and
neither does *.txt, so both are errors, in Iruka and in every other regex engine.
Write .* for any run of characters and . for any single one — . is the "any character"
token and * repeats it. For the characters themselves, escape them: \* and \?. That's the same
thing the wildcards give you with the checkbox off, spelled out.
One deliberate difference from Perl and Python: a pattern that can match nothing — .*, \d*,
(jpg)? — also matches as an empty string beside the text it found, and Iruka does not replace
those empty matches. .* → photo gives photo, not photophoto; \d* → X turns IMG_0001
into IMG_X, not XIXMXGX_XX. The cost is that you can't insert a character between every letter
with x*; patterns that must match at least one character, like \d+ or \s+, are unaffected.
While a pattern is incomplete or invalid, Iruka shows what's actually wrong under the field — a bracket with no partner, a count that runs backwards, a quantifier with nothing to apply to — and Rename stays disabled, so a broken step can't quietly match nothing while the other steps go ahead without you noticing.
Prefix & Suffix
Prefix goes at the front of the name. Suffix goes at the end of the name but before the
extension, so a suffix of _final turns report.pdf into report_final.pdf, not
report.pdf_final.
Number
Switch on Add a sequence number, then choose:
- Position — before the name (Prefix) or after it (Suffix)
- Start — the first number in the sequence
- Pad — how many digits, zero-filled, so
3gives001,002,003 - Separator — the character between the number and the name
Files are numbered in the order they appear in the file list, so sort the folder the way you want them numbered before opening the sheet.
Extensions are never touched
Every step works on the name only. archive.tar.gz keeps its .gz, and a file with no extension
at all is renamed cleanly without one being invented.
This is worth knowing before you write a pattern: the extension isn't part of what Find sees, so
*.txt matches nothing at all — you want plain *. Iruka spots that particular case and says so
under the field rather than leaving you with an empty preview.
Preview and undo
The preview lists every selected file with its new name; changed rows are highlighted and the header counts how many will actually change. If nothing would change, Rename is disabled.
A batch rename is a single undo step — one ⌘ Z puts every name back, and ⇧ ⌘ Z redoes the whole batch.
Limits
One find/replace per pass, in the fixed order above. If you need two different replacements, or want the replacement to see a prefix you just added, run the sheet twice.