Tools / File Renamer Batch

File Renamer Batch

Paste file names, set the rules, check the preview, then download a rename script and the undo script that reverses it. The tool never touches your files. It only writes text.

File names, one per line

Find and replace

Add, number, tidy

Rules run in this order: find and replace (the first pair, then each added pair from top to bottom), spaces, prefix and suffix, number, case. The extension is the text after the last dot, so photo.tar.gz keeps .gz only.

Preview

Scripts

The bash script was run against real files in tests. The PowerShell script was not run.

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.

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.

File Renamer Batch

See it at work

Free batch file rename script maker in your browser: find and replace with regex, prefix, suffix, numbering, case, collision checks, a bash script with an undo

File Renamer Batch
Fields
API
CLI
names
find
replace_with
use_regex
ignore_case
hiringsai tool file-renamer-batch
names IMG_4032.JPG IMG_4033.JPG draft fi
find string
replace_with string
use_regex False
15 fields, 1 required
curl -X POST https://hiringsai.com/api/v1/tools/file-renamer-batch/run
-d '{"input": {"names": "<text>"}}'
JSON result
hiringsai run file-renamer-batch --input '{"names": "<text>"}'
also callable over MCP
JSON result printed
Free toolAPI and MCPNo account
Fields
namesIMG_4032.JPG IMG_4033.JPG draft fi
findstring
replace_withstring
use_regexFalse
Ways to use it
pagethis app
APIPOST .../run
CLIhiringsai run
MCPtools/call
API call
POST /api/v1/tools/file-renamer-batch/run
input: {"names": "<text>"}
JSON result back
Command line
hiringsai run file-renamer-batch
--input <json>
JSON result printed
The File Renamer Batch page as it opens
File Renamer Batch15 fields
The page as it opens, captured from the live site.
The File Renamer Batch app at phone width
File Renamer Batchphone layout
The same app at phone width.
A woman working at a desktop monitor
File Renamer BatchFree tool
Free batch file rename script maker in your browser: find and replace with regex, prefix, suffix, numbering, case, collision checks, a bash script with an undo
A laptop on a wooden desk with a person typing
File Renamer BatchAPI and MCP
Call it from a script over the API or MCP.