Windows Batch Rename: Stop Manual File Renaming
In this article
If you've been manually renaming files one by one in Windows, you can stop now: Windows Explorer has a built-in batch rename feature that renames multiple files at once in seconds. Select the files, press F2, type a name, and press Enter — Windows appends numbers to each file automatically. This article explains how that feature works, when to use it, and what to do when you need more control.
How the Built-In Batch Rename Works
The feature is part of File Explorer (formerly Windows Explorer) and has been present since Windows Vista, so it works on Windows 7, 8, 10, and 11. The process is simple:
- Select multiple files in File Explorer (hold Ctrl to pick individual files, or Shift to select a range).
- Press F2 (or right-click and choose Rename).
- Type the new base name (e.g.,
Holiday Photo). - Press Enter.
Windows renames the files as Holiday Photo (1).jpg, Holiday Photo (2).jpg, and so on. The numbering starts at 1 and increments by 1 for each file, in the order they appear in the folder. If you select files that are not adjacent, the numbering follows the current sort order in the folder.
What You Can and Cannot Do With It
The built-in feature is great for quick, uniform renames, but it has limits. It always adds a space, a number in parentheses, and keeps the original file extension. You cannot:
- Change the file extension (e.g., from .jpg to .png).
- Add a prefix or suffix without the automatic number.
- Use a custom numbering format (like 001, 002).
- Reorder files arbitrarily — the numbering follows the folder sort order.
- Rename files in subfolders recursively.
If you need any of those, you'll need a third-party tool or a command-line method.
PowerShell and Command Prompt Alternatives
For more control, Windows includes command-line tools that can rename files with patterns. The ren command in Command Prompt can rename multiple files that match a pattern, but it doesn't add sequential numbers. For example, to change all .txt files to .md:
ren *.txt *.mdPowerShell is more powerful. To add a prefix to all .jpg files in a folder:
Get-ChildItem *.jpg | Rename-Item -NewName { "prefix_" + $_.Name }To add a zero-padded sequence number, you can use a loop with a counter. PowerShell also lets you rename files in subfolders with -Recurse. These methods are scriptable and can be saved for reuse, but they require some familiarity with the command line.
Third-Party Renaming Tools
When the built-in feature and command line aren't enough, dedicated renaming utilities offer the most flexibility. Popular free options include Bulk Rename Utility, Advanced Renamer, and Ant Renamer. These tools allow you to:
- Use regular expressions to find and replace patterns.
- Insert text at any position in the filename.
- Change case, remove characters, or replace spaces with underscores.
- Generate numbering with custom starting values, step sizes, and padding.
- Preview the new names before applying them.
These tools are especially useful for organizing large media libraries, such as photos, music, or documents, where you need consistent naming schemes beyond simple numbering.
Common Problems and Troubleshooting
Here are a few issues you might encounter with the built-in batch rename:
- Files don't rename in the order you expect. The numbering follows the folder's sort order (by name, date, etc.). To control the order, sort the files the way you want before renaming.
- You get a message about a file already existing. This happens if the new name collides with an existing file. Windows will skip that file and continue with the rest, but the numbering may skip a number.
- Undo doesn't work. Windows lets you undo a batch rename with Ctrl+Z, but only if you haven't done other operations in between. If you can't undo, you'll need to rename them back manually.
- Hidden file extensions. If file extensions are hidden (the default in Windows), you might accidentally rename the extension, making the file unreadable. To avoid this, show file extensions in File Explorer (View > Show > File name extensions) before renaming.
Safety Tips Before You Rename
Renaming files is generally safe, but a mistake can be annoying. Follow these precautions:
- Back up important files before a mass rename, especially if you're using a third-party tool.
- Test on a copy of a few files first to see the result.
- Don't change file extensions unless you know what you're doing — changing .docx to .pdf won't convert the file; it will just make it unopenable.
- Use a consistent naming scheme that includes a date or project name, so files remain sortable.
Frequently Asked Questions
Can I rename files in bulk in Windows without any extra software?
Yes, the built-in File Explorer batch rename (F2) works for many simple cases. It adds a number in parentheses to each file. For more complex renames, you can use PowerShell or the Command Prompt, which are also built into Windows.
How do I rename files with a specific pattern like IMG_001.jpg?
The built-in feature can't do zero-padded numbers. You can use PowerShell with a loop that formats the counter with {0:D3} to get 001, 002, etc. Alternatively, a third-party tool like Bulk Rename Utility offers a numbering option with padding.
Why does Windows skip numbers when I batch rename?
Windows skips a number when the target name already exists in the folder. For example, if you rename files to Photo (1).jpg and a file with that name already exists, Windows will skip to the next available number. To avoid this, make sure the folder doesn't contain files with the new names.
Can I undo a batch rename in Windows?
Yes, you can press Ctrl+Z immediately after the rename to undo it. However, the undo history is limited and may be cleared if you perform other file operations. If you can't undo, you'll have to rename the files back manually or use a backup.
Does batch rename work on files in subfolders?
No, the built-in File Explorer feature only renames files in the current folder. To rename files in subfolders, you need to use a command-line tool like PowerShell with the -Recurse parameter, or a third-party tool that supports recursive renaming.