PowerToys PowerRename Guide: Bulk Rename Files in Windows

- PowerRename renames many files and folders at once with search and replace, optional regular expressions and a live preview.
- Select files in File Explorer, right-click and choose Rename with PowerRename.
- Use the preview before you apply. Clear the checkbox next to any file you do not want to rename.
- Counters, dates, random text and photo details (EXIF) can all be added to new names with variables.
Renaming 200 photos by hand is slow and easy to get wrong. PowerRename, part of Microsoft PowerToys, lets you change many names in one step and see the result before you commit.
This guide covers everyday use first and regular expressions later, so you can stop at the level you need. It is one of the utilities in our Microsoft PowerToys guide.
Sources and accuracy
The options, variables and examples come from Microsoft's official PowerRename page on Microsoft Learn, which we read in October 2026. Where the page does not describe something, we say so.
How to open PowerRename
- Make sure PowerRename is turned on in PowerToys Settings.
- In File Explorer, select the files or folders you want to rename.
- Right-click and choose Rename with PowerRename. If you do not see it, check the Show PowerRename in setting, which decides whether it appears in the default context menu or only in the extended one (on Windows 11, look under the older-style menu).
The window shows your selected items, a Search for field, a Replace with field, a list of options and a Preview area.
A simple example
Imagine files named holiday-photo-1.jpg, holiday-photo-2.jpg and so on.
- In Search for, type
holiday. - In Replace with, type
Trip. - Look at the preview. Names that will change are shown with the new name.
- Apply the rename when you are happy with the preview.
If you made a mistake, the official demo shows that Windows Explorer's Undo Rename (Ctrl + Z) can reverse the last change. Do not rely on this for important files. Copy the files first if you are unsure.
Options explained
| Option | What it does |
|---|---|
| Use regular expressions | Treats Search for as a pattern, not plain text. |
| Match all occurrences | Replaces every match in the name. If cleared, only the first match is replaced. |
| Case sensitive | Matching is case-insensitive by default. |
| Filename only / Extension only | Choose which part of the name changes. |
| Include files / folders / subfolders | Clear one to leave those items out. |
| Enumerate items | Lets you use counters in Replace with. |
| Random string values | Lets you use random text in Replace with. |
| Text formatting | Change names to lowercase, uppercase, title case or capitalise every word. |
Match all occurrences, an example from Microsoft: for powertoys-powerrename.txt, searching power and replacing with super gives supertoys-powerrename.txt when the option is cleared, and supertoys-superrename.txt when it is selected.
Add numbers (counters)
Turn on Enumerate items, then use these in Replace with:
| Variable | Meaning |
|---|---|
${} |
A simple counter starting at zero |
${increment=X} |
Counts up by X |
${padding=X} |
Adds leading zeros |
${start=X} |
Starts at X |
You can combine them. Microsoft's example: with files a.jpg, ab.jpg and abc.jpg, searching a and replacing with Image_${padding=4;increment=2;start=10}_ gives Image_0010_.jpg, Image_0012_b.jpg and Image_0014_bc.jpg.
Add dates, random text and photo details
File creation date and time. Use variables such as $YYYY, $MM, $DD, $hh, $mm and $ss. Microsoft's example: searching powertoys and replacing with $MMM-$DD-$YY-powertoys gives names like Nov-02-20-powertoys.png.
Random strings. Turn on Random string values, then use ${rstringalnum=X}, ${rstringalpha=X}, ${rstringdigit=X} or ${ruuidv4}.
Photo details. In the options, choose the EXIF/XMP setting to use variables such as $CAMERA_MODEL, $ISO, $DATE_TAKEN_YYYY and $WIDTH. This is handy for sorting photos by when they were taken.
Regular expressions for beginners
A regular expression (regex) is a pattern. You do not need regex for simple jobs, but it helps for bigger ones. Turn on Use regular expressions. PowerRename uses ECMAScript syntax by default. Turn on Use Boost library in PowerToys settings if you need extra features such as lookbehind.
Parentheses make a group, and $1, $2 refer to the groups in the replacement. Variables like $1 need Match all occurrences to be selected.
| Search for | Replace with | Result |
|---|---|---|
(.*).png |
foo_$1.png |
Adds foo_ in front of PNG names |
(.*).png |
$1_foo.png |
Adds _foo at the end |
(.*) |
$1.txt |
Adds .txt to every name |
(\d\d)-(\d\d)-(\d\d\d\d) |
$3-$2-$1 |
Turns 29-03-2020 into 2020-03-29 |
^.{n} |
(empty) | Removes the first n characters |
These examples come from Microsoft's page. Test any pattern on a few files first.
Use the preview to stay safe
- In the Original column, click a file to clear it. Cleared files are not renamed even if they match.
- Click the Renamed column header to show only the files that will change.
- Look for names that are too short, empty or the same as another file. Two files cannot share one name in the same folder.
Settings
The official page lists these settings: Show PowerRename in, Hide icon in context menu, Restore flags on launch, auto-complete for search and replace fields, Show recently used strings and Use Boost library.
Common problems
The menu item is missing. Check that PowerRename is turned on and review Show PowerRename in.
My $1 shows up as text. Turn on Use regular expressions and Match all occurrences.
Nothing changes. Check that the files are selected, that your search text really appears in the names and that the options (such as Filename only) match what you want.
I made a mistake. Try Undo Rename (Ctrl + Z) in File Explorer straight away. For a big batch, work on a copy of the folder first.
Frequently asked questions
Is PowerRename free? Yes, it is part of Microsoft's free PowerToys.
Can it rename folders? Yes, if Include folders is on.
Can it change file extensions? Yes, use Extension only. Only do this if you know the file type is really changing format, because changing an extension does not convert a file.
Does it work with undo? The official demo shows Explorer's Undo Rename. The page does not describe a separate undo inside PowerRename.
Official links
Want to organise your screen too? See the FancyZones guide.
Conclusion
Start with a simple search and replace, check the preview, and add counters or dates when you need them. Save regular expressions for the jobs where plain text is not enough.
Sources checked: the official PowerRename page on Microsoft Learn (October 2026).