A laptop, a phone and a hand writing in a notebook on a wooden desk, banner image on the File Renamer Batch page

Werkzeuge / Automate suite

File Renamer Batch

Paste file names, set find-replace, number and case rules, and get a checked rename script and an undo script.

Paste a list of file names and set the rules. The tool shows every old and new name, flags name clashes and names Windows does not allow, and writes a bash script, a PowerShell script, an undo script and a CSV. It never touches your files.

Open the toolWhat is insideWhat it cannot do
Screenshot of the File Renamer Batch tool

What is inside

What is inside the tool.

Rules

Find and replace as plain text or a JavaScript regular expression (with $1 and $& in the replacement, and an ignore-case switch). Add as many find-and-replace pairs as you need; they run in order and you can move or remove each one, spaces to hyphens or underscores, prefix, suffix, numbering before or after the name with padding, and four case styles.

Name or whole name

Apply find and replace to the part before the last dot, or to the whole name. Optionally lowercase the extension.

Checks before any script

Two files getting one name, empty names, names with a slash, a file listed twice. These block the scripts. Case-only clashes and Windows-only problems (reserved characters, names such as CON or NUL.txt, a trailing space or period) are shown as Check.

Safe bash script

Quotes every name, uses -- so names that start with a hyphen work, and never overwrites. If a new name is another listed file's current name, as in a swap, every file goes through a temporary folder first.

Undo script

A second script that moves every file back, built from the same list.

PowerShell script and CSV

Rename-Item with -LiteralPath, plus a CSV of old name, new name and whether it changes.

How to use it

Four steps.

Step 1

Paste the file names, one per line, from one folder.

Step 2

Set the rules and read the preview. Resolve anything marked Fix.

Step 3

Download rename.sh or rename.ps1, and keep undo.sh beside it.

Step 4

Open the script, read it, then run it inside the folder.

What it cannot do

Limits.

It cannot see your folder

It works from the names you paste. If a new name already exists in the folder, the bash script skips that file and says so. The PowerShell script stops with an error.

No file contents or metadata

No dates, photo tags or audio tags. This tool renames from the name text only.

Extension means the last dot

photo.tar.gz is treated as photo.tar plus .gz.

Not run: PowerShell

Only the bash script was run against real files. Read the PowerShell script before use.

Not a file system model

The tool does not know whether your file system treats Name and name as one file. It warns about case-only clashes.

Batch size

5,000 names per run.

What it does

Features and functions.

What it isA web page that writes scripts
PreviewOld and new names, with clash checks
MethodsReplace, prefix, suffix, numbering, case, spaces
Regular expressionsYes, JavaScript

Common mistakes

Each of these produces a finding.

Two files get one name

Stripping a number or date can make names equal. The tool marks it Fix and writes no script.

A swap done in order

Renaming a to b, then b to a, loses a file. The script uses a temporary folder when new names are other files' current names.

Windows names

Names such as CON or NUL.txt, characters like : and ?, and a trailing space or period are not allowed on Windows, per the Microsoft page.

Names that start with a hyphen

The bash script uses -- so mv does not read them as options.

A regex that matches nothing

The preview shows no change, so you can see it before running.

Running without a look

Read the script first. The undo script only works if the folder has not changed since.

Undo comes free

Every plan generates the reverse script too. Run undo.sh and every name goes back.

Windows-safe names

Reserved device names like CON, PRN, NUL and COM1 to COM9 are flagged before they bite.

Stack the replacements

Add as many find-and-replace pairs as the job needs; they run top to bottom, regex optional.

Preview before anything

Up to 500 rows of before and after, checked for collisions and empty names, before you download a thing.

Questions

Before you ask.

Does it rename my files?

No. It writes text. You run the script.

Can it undo?

Yes, with undo.sh, if you run it in the same folder before other changes.

Does it overwrite files?

Not by itself. The bash script skips a name that already exists and the PowerShell script stops.

What does it cost?

Nothing. No account.

Does it rename the files?

No. It writes scripts - bash, PowerShell, and an undo - that do the renaming when you run them.

What is the extension rule?

The extension is everything after the last dot, so photo.tar.gz keeps .gz only.

Regex flavor?

JavaScript. $1 and $& work in the replacement, with an ignore-case switch.

Your data

What stays on your device.

The tool runs in this browser tab. The names you paste stay in the page. Nothing is uploaded, fetched or opened, and no file on your computer is read or changed.

Keep going

Other tools you may want next.

Sources

Where the facts come from.

Try it

Preview the renames, then take the script

Open File Renamer Batch
A laptop, headphones, a camera, a phone and a plant on a white desk, seen from above, banner image on the File Renamer Batch page

Try it now.

File Renamer Batch runs in your browser. No account needed.

Input To Output

Names in, scripts out

File names,one per lineRulesPreviewrename.shundo.shrename.ps1CSVFile RenamerBatchInOut
InFile names, one per lineRulesFile RenamerBatchPreviewrename.shundo.shrename.ps1CSVOut
Rules turn a list of names into a preview and rename scripts. Your files are never touched.

Pipeline

Order of the rules

Find and replace,pair by pairSpacesPrefix and suffixNumberCase
Find and replace, pair by pairSpacesPrefix and suffixNumberCase
Fixed order, top to bottom.

Before After

Apply to

MenuEffectName without its lastextensionWhole nameExtension is left aloneExtension can change too
Menu to EffectName without its last extensionExtension is left aloneWhole nameExtension can change too
Two choices.

Before After

Extension rule

NameExtensionphoto.tar.gzreport.final.docx.gz.docx
Name to Extensionphoto.tar.gz.gzreport.final.docx.docx
The extension is after the last dot.

Before After

Spaces

MenuResultKeep spacesTo hyphensTo underscoresdraft final v2draft-final-v2draft_final_v2
Menu to ResultKeep spacesdraft final v2To hyphensdraft-final-v2To underscoresdraft_final_v2
Three choices.

Before After

Case

MenuResultKeep caselowercaseUPPERCASETitle Casekebab-caseAs typeddraft final v2DRAFT FINAL V2Draft Final V2draft-final-v2
Menu to ResultKeep caseAs typedlowercasedraft final v2UPPERCASEDRAFT FINAL V2Title CaseDraft Final V2kebab-casedraft-final-v2
Five choices.

Before After

Kebab case on the screenshot name

NameResultScreen Shot 2026-11-20 at9.41.22 AMscreen-shot-2026-11-20-at-9-41-22-am
Name to ResultScreen Shot 2026-11-20 at 9.41.22 AMscreen-shot-2026-11-20-at-9-41-22-am
Everything not a letter or digit becomes a dash.

Spec Sheet

Prefix, suffix, numbering

Prefix and suffixadded around the stemNumber positionstart or endPad0 to 12 digits, default 3Extensionlowercase option
Prefix and suffixadded around the stemNumber positionstart or endPad0 to 12 digits, default 3Extensionlowercase option
In that order.

Before After

Numbering

SettingResultStart 1, pad 3Start 10, pad 2Start 1, pad 0name-001, name-002name-10, name-11name-1, name-2
Setting to ResultStart 1, pad 3name-001, name-002Start 10, pad 2name-10, name-11Start 1, pad 0name-1, name-2
Starts at your number, padded to your width.

Bar Compare

Pad width

Lowest0 digitsStarts at3 digitsHighest12 digits
Lowest0 digitsStarts at3 digitsHighest12 digits
From 0 to 12.

Spec Sheet

Errors that block the script

Name listed twiceblocked, with line numbersTwo files, one new nameblockedSlash or NUL in a nameblockedEmpty or dot-only nameblocked
Name listed twiceblocked, with line numbersTwo files, one new nameblockedSlash or NUL in a nameblockedEmpty or dot-only nameblocked
Fix these first.

Spec Sheet

Warnings that do not block

Windows-illegal charactersflaggedReserved device namesCON, NUL, COM1, LPT1Trailing space or periodflaggedCase-only differencesclash on some systems
Windows-illegal charactersflaggedReserved device namesCON, NUL, COM1, LPT1Trailing space or periodflaggedCase-only differencesclash on some systems
Worth a look before you run.

Input To Output

rename.sh

The planSkips a fileif the newname existsNeveroverwritesRead it firstScriptInOut
InThe planScriptSkips a file if the new nameexistsNever overwritesRead it firstOut
A bash script.

Input To Output

undo.sh

The planNew names backto oldScriptInOut
InThe planScriptNew names back to oldOut
Reverses the rename.

Input To Output

rename.ps1

The planRename-Item byliteral pathStops on thefirst errorScriptInOut
InThe planScriptRename-Item by literal pathStops on the first errorOut
A PowerShell script.

Input To Output

CSV

The planfrom, to,changedCSVInOut
InThe planCSVfrom, to, changedOut
A log of the plan.

Pipeline

Swapping names safely

The page spots theoverlapEvery file movesto a temporaryspotThen to its newname
The page spots the overlapEvery file moves to a temporaryspotThen to its new name
When a new name is another file's old name.

Spec Sheet

The fine print

No folder accessexisting names unseenScripts skipnever overwriteList limitfirst 5,000 linesPreviewfirst 500 shown
No folder accessexisting names unseenScripts skipnever overwriteList limitfirst 5,000 linesPreviewfirst 500 shown
What the page cannot know.