To batch rename files on Windows, select everything in File Explorer, press F2, and Windows renames the whole selection with a number sequence in about five seconds. For anything more involved, such as find-and-replace rules, prefixes, or regular expressions, install Microsoft PowerToys and use its PowerRename menu, or run a short PowerShell or Command Prompt command.
Windows has no dedicated batch rename dialog hiding in the ribbon, which is where most of the confusion starts. There is no one button that opens a rule builder. What you have is a fast built-in numbering trick, one free Microsoft add-on that does search-and-replace with a live preview, and two command shells for repeatable patterns across hundreds of files.
The built-in method takes under a minute to learn and needs nothing installed. The PowerShell route takes an afternoon to get comfortable, but it is the one that survives an archive of several thousand files or a nested folder tree. Either way, copy the folder before you start.
Table of Contents
- 1What You Need
- 2How to Batch Rename Files on Windows: Step-by-Step
- 3How to batch rename files with File Explorer
- 4How to batch rename files by extension
- 5How to batch rename files using PowerShell
- 6How to batch rename files using Command Prompt
- 7How to undo a batch rename
- 8Common Mistakes
- 9Frequently Asked Questions
- 10How can I bulk rename files in Windows 11?
- 11What is the easiest way to rename multiple files at once in Windows?
- 12Why won’t Windows 11 let me rename files?
- 13How do I use a batch file to rename files?
- 14Can I batch rename files inside subfolders on Windows?
- 15How do I undo a batch rename in Windows?
- 16Conclusion
What You Need
Nothing to buy. Every method below runs on a stock Windows 10 or Windows 11 machine, which is why this works on a fresh laptop with no extra software at all.
File Explorer is the starting point because it ships with Windows and handles the most common job: turning a pile of camera dumps into numbered, sortable names. It cannot search inside names, so it is the wrong tool once you want to strip a prefix or replace a word across 200 files.
Microsoft PowerToys is the add-on that adds a real rule editor. It is free, open source, and it is not bundled with Windows, so you install it from the Microsoft Store or from the PowerToys page on GitHub. Once installed it adds a PowerRename entry to the right-click context menu in File Explorer.
PowerShell and Command Prompt are both already on your machine. PowerShell wins when a rule involves a counter, a date, or recursion into subfolders. Command Prompt is fine for one wildcard swap, and it is the shell to use if you want to save the job as a .bat file you can run again later.
Before picking a lane, look at the shape of the job:
| Method | Skill level | Best for | Recurses into subfolders | Undo after the fact |
|---|---|---|---|---|
| File Explorer select and F2 | Beginner | Sequential numbers on one folder | No | Yes, with Ctrl+Z |
| PowerToys PowerRename | Beginner to intermediate | Find and replace, case changes, regex | No | Yes, with Ctrl+Z |
| PowerShell | Intermediate | Counters, date stamps, nested folders, CSV name lists | Yes | Only from a backup |
| Command Prompt with FOR | Beginner | One wildcard rename or a saved batch file | No | Only from a backup |
| Third-party utility | Intermediate | Metadata-driven naming, huge archives | Some tools do | Varies by tool |
A few shortcuts are worth memorizing before you start: Ctrl+A selects everything in the open folder, Ctrl+click adds individual files, Shift+click selects a range, F2 opens the rename box for the current selection, and Ctrl+Z is the undo that will save you.
How to Batch Rename Files on Windows: Step-by-Step

How to batch rename files with File Explorer
Open the folder in File Explorer and click any file once to focus the view. Press Ctrl+A to select everything, or hold Ctrl and click the files you actually want. Change the sort order first if the sequence matters, because Windows numbers the files in the order they are listed right now.
Press F2. A rename box appears on the first file with only the name highlighted, so the extension stays out of the way. Type a base name such as receipt and press Enter. Every selected file is renamed receipt (2).jpg, receipt (3).jpg and so on, keeping each original extension.
You did not want numbering? Before pressing Enter, click inside the text and delete only the highlighted name portion. Type the shared part of the new name instead, then press Tab instead of Enter. Tab commits that file and jumps straight to the next one, so you can retype the unique part and Tab through the whole selection without touching the mouse.
To start at a number other than 2, click the selected name in the box and type trip (7). The rest of the sequence continues from there.
How to batch rename files by extension
Rename only the files you care about by filtering first. In Windows 10 and 11, open the View tab, click the Filter button, and pick the file type, such as JPEG files. The folder then shows only those items, and the unfiltered files are hidden rather than deleted.
Select the filtered set with Ctrl+A and press F2. Because the filter already separated the types, your numbering applies cleanly to one extension, giving you names like vacation-photo-01.jpg beside untouched .heic siblings. Clear the Filter when you are done.
The same trick works for documents. Filter to PDF, select all, F2, type report, and you get report (2).pdf, report (3).pdf, numbered in whatever order the folder is currently sorted. Sort by date modified first if you want them in the order you actually worked on them.
One thing to check before you go further: turn on file name extensions under View and then Show, then File name extensions. If that box is unchecked, Windows hides extensions in the rename box and a lot of people think they have accidentally changed a file type when they have not.
How to batch rename files using PowerShell

Open PowerShell in the folder you want to work on. Right-click the folder background and choose Open in Terminal, or press Win+X and pick Terminal, then cd into the directory. Work on a copy the first time you run anything.
Preview first, change second. This command prints the new names without touching a single file:
$i = 0; Get-ChildItem -File *.jpg | ForEach-Object { $i++; "vacation-photo-{0:D2}.jpg" -f $i }
Read that output until the names look right, then run the real version, which adds Rename-Item to the same pipeline:
$i = 0; Get-ChildItem -File *.jpg | ForEach-Object { $i++; Rename-Item $_.FullName ("vacation-photo-{0:D2}.jpg" -f $i) }
The {0:D2} format pads the number so you get 01 through 09 and then 10, which keeps a sorted view in correct order. Without the padding, a folder listing puts 10 before 2 every single time.
A date stamp from file metadata looks like this, and it is the fix for a camera or recorder whose clock was wrong:
Get-ChildItem -File *.mp4 | Rename-Item -NewName { "{0:yyyy-MM-dd}_{1}" -f $_.CreationTime, $_.Name }
Prefixes and suffixes are a one-liner too. Add a prefix to everything in the folder:
Get-ChildItem -File | Rename-Item -NewName { "archive-" + $_.Name }
Recursion is the reason most people end up in PowerShell. Adding -Recurse reaches every subfolder, and a running counter keeps the numbering unique across the whole tree:
$i = 0; Get-ChildItem -Recurse -File *.jpg | ForEach-Object { $i++; Rename-Item $_.FullName ("photo-{0:D3}.jpg" -f $i) }
Two things go wrong with scripts. If the folder already holds files named photo-001.jpg, the rename stops partway with an item already exists error, so clear the folder or move the existing numbered files first. And a wildcard in -NewName keeps the old extension appended, which is why the recursive example builds the extension into the string instead.
If you are renaming to a list of names that already exists somewhere, such as a column in a spreadsheet, load it with Import-Csv and walk both lists together. That is the only clean way to match 40 recovered PDFs to 40 titles without doing it by hand.
How to batch rename files using Command Prompt
Command Prompt handles the flat, single-rule case well enough that many people skip PowerShell entirely for it. Open Command Prompt in the target folder, then use ren with a wildcard:
ren *.jpg vacation-*.jpg
That works because ren accepts a wildcard on both sides. It is the fastest way to fix extensions in bulk, such as turning ren *.jpeg *.jpg, or prefixing an entire folder of downloads.
For a pattern that needs a counter, wrap it in a FOR loop. In an interactive Command Prompt window you use one percent sign, and in a saved batch file you use two:
for %f in (*.jpg) do ren "%f" "holiday-%f"
The limitation is honest: ren has no counter, no date handling, and no preview. There is no dry-run switch, so you copy the folder first and check the result afterwards. If a name would already exist, ren stops with a duplicate name error and leaves the remaining files untouched, which at least fails safely.
Saving those two lines as renamer.bat in the folder means you can rerun the same job next month without retyping anything. Double-click the file to run it, or call it from a shortcut.
How to undo a batch rename
Stay inside File Explorer after a rename and press Ctrl+Z. Windows keeps a rename in the undo stack, and the original names come straight back, which covers the overwhelmingly common case of wanting to try a different pattern.
Ctrl+Z stops working once you close and reopen the Explorer window, so do the rename and the check in the same sitting. It also covers PowerRename and third-party utilities, because they all call the same rename operation underneath.
Scripts are different. Rename-Item and ren leave nothing behind to undo, so a backup or File History is the only way back. Right-click the folder, choose Properties, then Previous Versions if you have File History or System Protection switched on. Restoring the folder brings back the old names along with everything else in it.
If you have neither, the honest answer is that the old names are gone and you are left with the new ones. That is the whole reason for copying the folder first.
Common Mistakes
Renaming in an order you did not intend. Windows numbers files in the order they appear in the current sort, not creation date and not name. Sort the folder the way you want the sequence, then select and rename without touching the sort again.
Replacing the extension by accident. If extensions are hidden and you select the whole filename, your new name swallows the extension and a .pdf becomes a .pdfjpg. Turn on View, Show, File name extensions so you can see what you are editing.
Stopping halfway with a duplicate name error. This happens when the target folder already contains files matching your pattern. Run the move first, or rename in two passes using a temporary suffix such as _tmp, then a second pass to clean those up.
Getting an access denied message. The file is open in another program, or the app has a lock on it. Close Word, Photoshop, or the preview pane and try again. On a file that refuses repeatedly, check the read-only attribute in Properties, Attributes.
Renaming a cloud file that is not downloaded yet. OneDrive and similar tools show placeholder files. Open each one once so it syncs down locally, then rename. Renaming while the placeholder is still online causes sync conflicts later.
Using characters Windows forbids. A filename cannot contain a backslash, forward slash, colon, asterisk, question mark, quotation mark, less-than or greater-than sign, or a pipe. Paste the name into a rename box and Windows will reject it immediately, which is a cheap warning.
Renaming hidden or system files. A script pointed at C:Windows or a program folder will happily rename thousands of files and break the install. Always run recursive commands against a folder you own.
Trusting PowerRename numbering blindly. The numbering options in PowerRename apply to a single selected item in a predictable way, and plenty of people end up with one numbered file and a folder full of untouched ones. When you need every file numbered, use the File Explorer F2 method or the PowerShell counter instead.
Forgetting about long paths. Windows still hits a 260 character limit unless long paths are enabled in the registry, and a deeply nested folder plus a long new name will error out with no useful message. Shorten the name or flatten the folder first.
Two habits remove nearly all risk. Copy the folder and run the batch on the copy, and read the preview before you apply it.
Frequently Asked Questions
How can I bulk rename files in Windows 11?
Select the files in File Explorer, press Ctrl+A to grab everything, then press F2 and type a base name. Windows applies a number sequence to the whole selection while keeping each original extension. Install Microsoft PowerToys and use the PowerRename context menu entry when you need find-and-replace, case changes or regular expressions instead of simple numbering.
What is the easiest way to rename multiple files at once in Windows?
The select-all-plus-F2 trick in File Explorer is the easiest and needs nothing installed. Click one file, press Ctrl+A, then F2, type the shared name and hit Enter. Ten seconds of typing renames hundreds of files. For anything involving search-and-replace text or regex, install Microsoft PowerToys and use its PowerRename option.
Why won’t Windows 11 let me rename files?
The usual causes are a file locked by an open program, a cloud placeholder that has not downloaded yet, a read-only attribute, or hidden file extensions making it look like the name is not saving. Close the app holding the file, open cloud files once so they sync locally, and check Properties and Attributes for read-only. Turn on View, Show, File name extensions to see what is really happening.
How do I use a batch file to rename files?
Open Notepad, type a ren command such as ren *.jpg vacation-*.jpg, and save it as renamer.bat in the folder you want to change, making sure Save as type is set to All Files. For a numbered sequence use a FOR loop with two percent signs: for %%f in (*.jpg) do ren u0022%%fu0022 u0022holiday-%%fu0022. Double-click the file to run it.
Can I batch rename files inside subfolders on Windows?
File Explorer and PowerRename both stop at the folder you are looking at. For nested folders use PowerShell with the Recurse switch, for example $i=0; Get-ChildItem -Recurse -File *.jpg | ForEach-Object { $i++; Rename-Item $_.FullName (u0022photo-{0:D3}.jpgu0022 -f $i) }. Preview it without Rename-Item first, and copy the folder before you run it.
How do I undo a batch rename in Windows?
Press Ctrl+Z in File Explorer while the window is still open and the original names return, including changes made by PowerRename and most third-party tools. Undo does not survive closing the window, and PowerShell or Command Prompt renames leave nothing to undo at all. For those, restore the folder from File History or a backup copy made before the rename.
Conclusion
Start with File Explorer. Select the files, press F2, type a name, and you have numbered 300 documents before your coffee cools. Install Microsoft PowerToys only when you need find-and-replace or regex, and move to PowerShell when the job involves counters, dates or nested folders.
Whichever route you take, preview the result, copy the folder first, and keep Explorer open so Ctrl+Z is one keystroke away. Those three habits are the difference between a rename that takes an afternoon to fix and one that never bothers you.


