If you have to rename a large number of files under Windows it is very tedious to do it one-by-one via the gui. Instead of writing a batch file, Microsoft has a suite of tools called PowerToys. PowerToys installs a utility called PowerRename that will do the job.
I did this under Windows 10, but I imagine that it is the same in Windows 11 based on the documentation on the PowerToys installation page.
- Start a PowerShell as an admin user
- Click on
Startand search for
- Right click on
PowerShell ISE) and select Run as administrator
- Click on
- Enter the following command to install PowerToys:
winget install Microsoft.PowerToys --source winget
- It will download the installed, check the hash of the binary, and execute the install. When I did it one of those “Do you want this app to make changes to this computer” prompts showed up in the task bar that I did not see right away and I had to click on the shield to maximize it and click OK to continue the installation.
- After the installation finished there was a “Welcome to PowerToys” window that provided some information about the package.
- I am not 100% sure if this is required, but I scrolled down until I found the PowerRename entry in the left-hand side bar and clicked on it.
Once installed navigate to the directory that contains the directory of files that you want to modify.
It is a good idea to make a backup of the folder before you make changes to it in-case something goes wrong and you want to start over. Simply right-click on the directory and select Send to -> Compressed (zipped) folder to create a zip file.
- Right-click on the folder that contains the files and select PowerRename
- In the dialog box that appears enter the string that you want to change in the Search for field, and enter the string to which you want it changed in the Replace with field
- There are additional settings that enable you to apply the change to just the filename and/or the extension
- The files that will be mutated are listed in the right-hand side of the dialog box
- Click apply and PowerRename will execute the configured changes on the files