Learn how to use the PowerToys PowerRename tool to rename multiple files in one shot.
Renaming multiple files in Windows in a single step has always been a challenge since the built-in options are limited. Several third-party batch file renaming tools are available, both free and paid. But now with the latest iteration of Microsoft's PowerToys, you can tap into a free batch rename utility.
Known as PowerRename, this feature lets you search for specific filenames and replace them with new names of your choosing. You can change the filename, the extension, or both.You can also apply expressions and variables to add some oomph to your renames.
Designed way back when for Windows 95, PowerToys was an attempt by Microsoft to fill in some of the gaps with Windows through a collection of cool and handy utilities. Missing for many years following its debut, PowerToys was repurposed for Windows 10 in September 2019. In partnership with development company Janea Systems, Microsoft has slowly been adding more tools to PowerToys for Windows 10, starting with FancyZones and the Windows Key Shortcut Guide and most recently PowerRename.
SEE: 20 pro tips to make Windows 10 work the way you want (free PDF) (TechRepublic)
To get started with PowerRename, go to Microsoft's GitHub page for PowerToys. Download and install the PowerToysSetup.msi file for the latest version. After launching PowerToys, right-click on its icon in the Windows System Tray and select Settings. Make sure the switch is turned on for PowerRename. You can also enable or disable the switch to Start At Login, which you should do for PowerRename if you intend to use it regularly. Click Save if you make any changes (Figure A).
Now, open File Explorer and navigate to a batch of files that you want to rename. Files of photos you've shot with a mobile phone or camera are good candidates since they're automatically named with numbers or other characters that don't have any meaning to you. Select the files you want to rename and then right-click on any of them. From the popup menu, select the command for PowerRename (Figure B).
To use PowerRename on a basic level, type the word or words you want to find in the Search For field and then type the replacement word or words in the Replace With field. For example, to replace the word IMG with the word IMAGE anywhere in the filename, type IMG in the Search For field and IMAGE in the Replace With field. The Preview window shows you the results. The option to Match All Occurrences renames every instance. Unchecking that option renames only the first instance, so in most cases, you'll want to leave that option checked. With Case Sensitive unchecked, the rename will look for all instances of the word IMG, including Img and img. With that option checked, it will look only for the upper case IMG. If all looks good, click the Rename button (Figure C).
You can now view the results in File Explorer. If the rename didn't achieve the desired results, that's okay. Since the tool integrates with File Explorer, you can undo the rename action. Simply press Ctrl + Z and the files revert back to their original names.
You can also rename entire folders, subfolders, and the files they contain in one shot. Right-click a folder with files and subfolders. Click on PowerRename from the popup menu. In the Search For field, type the name you wish to find, such as IMG. In the Replace With field, type the replacement text, such as IMAGE.
Scroll down the Preview window to see all the folders and files that will be included in the rename. You can uncheck any folders or files that you want to exclude. You can also check the box to exclude files, which would rename only folders that match the search criteria. You can check the box to exclude folders, which would then rename only matching files. You can check the box to exclude subfolder items, which would exclude and folders and files inside a subfolder. The Renamed column in the Preview window displays only the items that would get renamed (Figure D).
Next, you can restrict the rename to only the filename or only the extension. For example, if you wish to rename the extension JPG to JPEG, type those in the Search for and Replace with fields, respectively. You can then check the box for Item Extension Only to make sure that the letters JPG in an extension are renamed but those in a filename are not renamed (Figure E).
The true power of PowerRename lies in its ability to handle expressions and variables. Perhaps you want to change the name for a group of files that have slightly different names. If these are photos, maybe they all start with the same letters but have a different number for the rest of the filename, such as IMG_3957, IMG_3958, etc. For this, you'd use an expression. First, check the box to Use Regular Expressions. In the Search For field, type the expression. In this case, we want to find all files that start with IMG. The expression here would be ^IMG. In the Replace With field, type the new starting letters to the filename. In this case, I'm using the phrase iPhone-Screens since these are screenshots snapped on my iPhone.
Let's take it a step further. Perhaps you want to remove the four digit number at the end of each filename. After the ^IMG, type the underscore that appears in the name followed by four dots for each number, as in ^IMG_…. The Preview window shows that the four numbers are removed, but now each file will be given the same name, which obviously won't work. That's where another option comes into play. Check the box to Enumerate Items, and each item is given a successive number in parentheses, such as (1), (2), (3), etc. If all looks good in the Preview window, click Rename to rename your files (Figure F).
For more information and help on the PowerRename tool, check out Microsoft's PowerRename readme file at GitHub.
- Windows 10 security: A guide for business leaders (TechRepublic Premium)
- How to activate and use the built-in Windows 10 back-up feature (TechRepublic)
- How to optimize Windows 10 power settings for higher performance (TechRepublic)
- In nostalgic move, Microsoft brings back PowerToys for Windows 10 (ZDNet)
- Windows 10 update: The complete guide for businesses of every size (ZDNet)
- Windows 10 updates: How to install, reinstall, upgrade, and activate (ZDNet)
- Microsoft resurrects PowerToys for Windows 10 (CNET)
- Use Windows 10's new PowerToys to tidy your desktop and remind you of shortcuts (CNET)
- Windows 10: More must-read coverage (TechRepublic on Flipboard)