How to batch rename files
Choose a method that lets you check the whole set before a wrong rule becomes hundreds of wrong names.
Free toolBatch File RenamerRename up to 500 files with ordered rules, a live name-by-name preview and one-off edits. Download renamed copies or a CSV name map.Open the renamerThe short answer
Pick one meaningful base name, keep the existing extension and add padded numbers when order matters. Preview the entire result before saving or changing files.
- Choose the files and decide what part of each original name should survive.
- Write one example of the finished name, including its number and extension.
- Apply the pattern to a small test batch, then inspect duplicates and unusual names.
- Rename the full set or download copies, depending on the method you chose.
Choose a naming pattern that will still make sense later
A useful filename says what the file is before you open it. A date or sequence helps when many files share the same subject.
| Original set | Useful pattern | Why |
|---|---|---|
IMG_4021.jpg, IMG_4022.jpg | harbour-trip-001.jpg, harbour-trip-002.jpg | A subject and padded sequence keep the gallery together. |
Report Final.pdf, Report Final 2.pdf | client-report-2026-10-08.pdf, client-report-2026-10-09.pdf | A date distinguishes versions when the dates are known and correct. |
capture A.png, capture B.png | checkout-step-01.png, checkout-step-02.png | Names describe the workflow and sort in order. |
Do not put a date into a name merely because one is available. A capture date, modification date and delivery date answer different questions.
Number by the order you intend to keep
Padded numbers sort reliably as text. For up to 999 files, three digits give 001 through 999.
Decide whether the order is capture time, a manually curated sequence or alphabetical order. A renamer can number files perfectly in the wrong order if that choice is left implicit.
Pick the method that fits your batch
Built-in tools are enough for a simple shared name. A rule editor helps when you need replacement, casing and exceptions together.
| Method | Best fit | Main tradeoff |
|---|---|---|
| Finder on Mac | Rename a selected group using Replace Text, Add Text or Format. | Changes files in place, so make a copy first when the source names matter. |
| File Explorer on Windows | Give selected files one shared base name quickly. | Its basic multi-file flow offers little control over a mixed rule set. |
| PowerRename on Windows | Preview searches, replacements and more advanced rules before changing local files. | Requires installing Microsoft PowerToys and learning its pattern controls. |
| floi in a browser | Stack simple rules, review collisions, edit exceptions and download copies. | Cannot rename an existing folder in place. A 512 MB batch cap and browser memory apply. |
| A script or desktop renamer | Repeat a known rule across very large folder trees or in an automated workflow. | You must test paths, collisions and unintended matches yourself. |
Apple documents Finder's Replace Text, Add Text and Format options in its Mac rename guide. Microsoft documents preview, search and replace in PowerRename. Those are product capabilities, not speed measurements.
Batch rename in Finder
Select the files, Control-click one and choose Rename. Choose Replace Text, Add Text or Format. Inspect the example in Finder before applying it.
Format can add a name and index. Replace Text is better when the old names already contain something worth keeping. Make a copy first if you may need the originals.
Batch rename in Windows File Explorer
Select a set and press F2 to enter a shared base name. Check the numbered results immediately after applying the rename.
For a replacement inside each existing name or a more detailed preview, use PowerRename or another rule editor. A plain base-name rename loses more of the old wording.
Microsoft lists F2 as the rename shortcut in its Windows keyboard reference.
Batch rename online without changing your source folder
Choose the files in the floi Batch File Renamer. Add rules for replacement, prefix or suffix, numbering, case and separators. The table shows each original beside its proposed name.
To discard the old wording, add Replace whole name and enter the new stem without its extension. For example, this-is-file.mp4 becomes video.mp4. Put a Sequence number rule afterwards for video-001.mp4 and video-002.mp4. Choose the Numbers only recipe for 1.mp4, 2.mp4 and so on.
The tool blocks the renamed download for duplicate or invalid names. You can move one row to change its number or type a one-off proposed name. It downloads copies and leaves the originals where they were.
Check collisions and extensions before saving
Two different originals can collapse to one result. Replacing both draft and final with an empty string may leave the same base name twice.
| Check | Example | Action |
|---|---|---|
| Exact duplicate | report.pdf appears twice. | Add a sequence or preserve another distinguishing word. |
| Case-only duplicate | Report.pdf and report.pdf. | Rename one before moving the set across operating systems. |
| Reserved or invalid name | CON.txt or plan?.pdf. | Choose a cross-platform safe name before export. |
| Changed extension | photo.png becomes photo.jpg. | Use an image converter if the bytes must really become JPEG. |
An extension is a label used by software to guess a file type. Changing the label alone does not re-encode the contents.
Microsoft's filename rules describe reserved device names and forbidden characters. A safe filename can still fail in a very long folder path, so check your destination too.
A small, reproducible ZIP check
On 8 October 2026, a synthetic three-file batch held 17 bytes of text. The rename rules removed -v2 and added three-digit numbers.
| Original | Name inside ZIP | Text bytes |
|---|---|---|
holiday-final-v2.txt | holiday-final-001.txt | 6, unchanged |
holiday-draft-v2.txt | holiday-draft-002.txt | 5, unchanged |
notes-final-v2.txt | notes-final-003.txt | 6, unchanged |
Method: Node 24 ran scripts/check-batch-file-renamer.mjs with the tool's rename planner and ZIP writer. The script reopened the ZIP and compared each extracted byte sequence with its input. The ZIP measured 389 bytes, larger than the 17 bytes of content because filenames and archive headers take space. These are synthetic text files, not a speed or large-file benchmark.
Keep a map when the names matter to other people
A before-and-after CSV lets someone trace a new name back to its source. It is useful for a client handoff or when links elsewhere still use the old names.
The floi tool exports this map separately from the renamed files. The CSV includes filenames, so inspect it before sharing. Keep the source files until the destination system reads the renamed copies successfully.
When a browser is the wrong place
Use a desktop tool or script for a folder tree with thousands of files, a recurring automated job or an in-place rename. A browser cannot silently alter arbitrary paths on your disk.
Use a metadata-aware tool if names must come from photo capture dates or document contents. This renamer applies the text rules you choose to existing filenames; it does not inspect file contents.