UUsefulCrate Your files never leave your browser

Home › Blog › Utility

Batch Rename Files Right in Your Browser

Renaming a hundred files is easy; reversing a bad rename is not. Build and verify the list of names first, then apply it on copies.

2026-11-06 · 7 min read

Renaming a whole folder of files in a browser is possible, but only in browsers that expose the File System Access API, and the page must ask for permission to a folder. UsefulCrate does not currently have a renaming tool. What it does have are the text tools that make the hard part — deciding on a hundred correct new names — quick and repeatable. This guide covers the local renaming options, the naming conventions worth adopting, and a workflow that keeps a mistake reversible.

Why batch renaming goes wrong

A single bad name is annoying; a hundred bad names is a recovery project. The usual failures are structural rather than technical: a numbering scheme that sorts incorrectly, a date format that is ambiguous across countries, characters that break a different operating system, and an overwrite that destroys the only copy. Sorting those decisions out before touching any file is the whole job.

ExampleProblemBetter
1.jpg … 12.jpgSorts as 1, 10, 11, 12, 2001.jpg … 012.jpg
03-04-2026.pdfMarch 4 or April 3?2026-04-03.pdf
Report:Final?.docxInvalid characters on Windowsreport-final.docx
Photo (1).jpgNo meaning, easy to duplicate2026-04-03-site-visit-01.jpg

ISO dates YYYY-MM-DD sort chronologically as plain text. Zero-padded numbers sort in the order a human expects. Lower-case kebab-case survives every filesystem and every URL. These three habits eliminate most of the pain before any tool is involved.

Method 1: let your operating system do a simple rename

macOS Finder can select a batch of files, right-click and choose Rename, then apply a format with an index, a counter or a date. Windows File Explorer lets you select several files, rename one, and have the rest numbered automatically. Both are local, reversible with an undo in many cases, and require nothing to install. For a set of holiday photos, this is the right answer.

Where they fall short is transformation: converting a phrase into a consistent identifier, replacing a word across a hundred names, or applying a rule that depends on the content of each name. That is where a text tool earns its place.

Method 2: build the list of names first, then apply it

This is the safest approach because nothing touches a file until the entire mapping is written down and checked.

  1. Get the current names into a text column. On macOS, copy the files in Finder and paste into a text editor that supports a list of paths, or use a terminal command such as ls -1. On Windows, dir /b gives a bare list. Paste that list into a plain text tool.
  2. Clean the column. The Text Cleaner removes blank lines, stray whitespace and duplicates, and can sort the list so you can see what you are working with.
  3. Generate the new names from a phrase. For each descriptive phrase, the Slug Generator produces a lower-case, punctuation-free name, and the Case Converter gives you snake_case or kebab-case variants if your project uses those conventions.
  4. Apply a rule across the whole list. The Find & Replace tool handles a wording swap, a case-sensitive change, or a regular expression that strips a camera prefix and renumbers rows. Test the pattern on three sample lines first.
  5. Diff old against new. Paste the original column and the generated column into the Text Diff tool, line by line. Every changed line should be intentional; a blank line or a shifted row shows up immediately.
  6. Apply the mapping. Use a local script or your operating system's rename command with the verified list. Work on copies in a new folder for the first run.

The diff step is what makes this genuinely safe. A batch rename is easy to do and hard to undo, while comparing two columns of text is instant and shows exactly what will change.

Method 3: a browser page with the File System Access API

Chromium-based browsers on desktop can ask for permission to a folder and then write to it. A page built on that API can rename files entirely on your device: you choose a folder, the page lists the names, you apply a rule, and it calls the filesystem to write the changes. Nothing is uploaded. The obvious limits are that the API is not available in every browser, it generally requires a secure context and a user gesture, and it cannot run on a phone in the same way.

UsefulCrate does not offer this yet. If you use another page that does, check the Network panel: a genuine local renamer shows no request containing file contents or even the full file list. Granting folder access to a page is a meaningful permission, so prefer one whose behaviour you can verify.

Method 4: a short local script

For a recurring job — monthly exports, camera dumps, downloaded invoices — a five-line script is more reliable than clicking through a UI every time. Python's standard library or a shell loop can read a mapping file and rename each entry, printing what it would do before doing it. The important pattern is a dry run:

# pseudocode: always preview before writing
for old, new in mapping:
    print(old, "->", new)     # dry run: read every line
# only after the preview is correct:
#   rename(old, new)

Keep the mapping file. If a name turns out to be wrong a week later, the mapping is both the undo instruction and the record of what happened. A rename performed by a UI leaves no such trail.

Naming rules that survive contact with other systems

The last point is easy to overlook. Filenames travel into cloud sync, email attachments, logs and screenshots. A name that is convenient internally can leak information when the file leaves that context.

Common questions

Can I rename files directly on this site?

No. UsefulCrate has no file-writing rename tool at the moment. The text tools here prepare and verify the list of names; the actual rename happens in your operating system, a local script, or a page built on the File System Access API.

What is the safest way to undo a bad batch rename?

Work on a copy first and keep an old-to-new mapping. With a mapping, reversing the operation is a second mechanical pass. Without one, you are reconstructing intent from a hundred files by eye.

Why do my numbered files sort in a strange order?

Text sorting compares characters from the left, so 10 comes before 2. Zero-pad every number to the same width — 001 through 100 — and the lexical order matches the numeric one on every operating system.

Tools on this site

Text Cleaner tidies a pasted column of filenames. Find & Replace applies a rule across the whole list. Text Diff compares the old names with the new ones before anything is written.

← All posts