Skip to main content
Mudry
Guides

How to batch rename files on Windows (four methods, ranked)

Rename hundreds of files at once on Windows — with File Explorer, PowerToys PowerRename, the command line or PowerShell. What each is good at, and the numbering trap that catches everyone.

Mudry Team4 min read

You have three hundred files called DSC_0001.JPG and you want them to say something useful. Windows has four different ways to do this and they are not equally good.

Here they are in the order most people should try them.

1. File Explorer — the built-in one

Select the files, press F2, type a name, press Enter. Windows renames every selected file to name (1), name (2), and so on.

That is the entire feature. It is genuinely useful for a batch of holiday photos and useless for anything else.

There is also a padding problem: Explorer produces (1) through (10), which sorts as 1, 10, 2, 3. For anything you will later sort by name, that is a real defect — see the numbering trap below.

2. PowerToys PowerRename — what to actually use

Microsoft PowerToys is a free, official add-on. PowerRename is the part that matters here.

Install it, then right-click any selection of files and choose PowerRename. You get:

  • Find and replace across all selected names
  • Optional regular expressions, with a live preview
  • Case changes
  • Numbering with configurable padding
  • A preview column showing exactly what each file will be called

That preview is the whole reason to prefer it. You see every result before committing, and conflicts are flagged before they happen.

3. Command Prompt — one job, done fast

ren *.jpeg *.jpg

Changing every extension in a folder is the one thing ren does better than anything else — it is instant and requires nothing installed.

Beyond that it gets unpredictable quickly, because wildcard matching in ren behaves in ways that surprise people. Use it for extensions and stop there.

4. PowerShell — power, and rope

Get-ChildItem *.jpg | Rename-Item -NewName { $_.Name -replace 'DSC_', 'Holiday_' }

Complete control. Also no preview, no undo, and a genuine ability to destroy a folder if the expression is wrong.

The numbering trap

This catches everyone once.

file1, file2file10 sorts as 1, 10, 2, 3, 4 — because names sort character by character, and "1" comes before "2".

The fix is zero padding, decided by your largest number:

FilesPad toGives
Under 1002 digits01, 02, 99
Under 10003 digits001, 010, 999

Pad generously. Going from two digits to three later means renaming everything again.

Before you rename anything

  1. Copy the folder first

    On a batch of any size, work on a copy. Renaming is not undoable, and the cost is a few minutes of disk space.

  2. Check the sort order

    Whatever order the files are in is the order the numbering follows. Sort by date taken, not by the meaningless name you are replacing.

  3. Preview, then commit

    PowerRename shows results live; PowerShell has -WhatIf. Use whichever your tool offers, every time.

Renaming is usually a symptom

If you are renaming files so you can find them, the underlying problem is often that they are all in one folder with no structure. Names are doing work that folders should be doing.

Part of a wider system for organizing files on Windows.

Was this useful?

Quick File Organizer

Folders that organize themselves, by your rules. Free, no account.

Get Quick File Organizer from the Microsoft Store (opens in a new tab)

Keep reading

Know when the next app ships

2 more Windows utilities are in development. One short email when each one is ready — nothing else.

Product releases only — roughly once a month. Unsubscribe any time.