With all the media available on the internet and the huge collections of digital libraries and images, we all have a problem when we want to rename a group of files to make them more accessible by providing a pronounced name or a name that makes sense. Renaming a group of files one by one is not only frustrating but also a time-consuming task. With that in mind, Microsoft long ago introduced a batch renaming feature in Windows Explorer that helps you rename multiple files at once.
Sure, you can use third party tools to batch rename files, but often these tools have many features that confuse the average user and you don’t want to install other software just to rename some files from time to time.
In this article, Niketrainers.com.co will tell you:
Using Windows Explorer
Using Windows Explorer to batch rename files in Windows is probably the easiest way. To batch rename files, simply select all the files you want to rename, press F2 (alternatively right-click and select rename), then enter the desired name and press Enter.
What the above does is get the given file name and append a number to each file name. As you can see in the photos above and below, I changed the file names from “test
batch-rename-files-win-explorer-rename-done
batch-rename-files-win-explorer-rename-done
Renaming files using Windows Explorer is so easy, but this method is just basic and inflexible, for example you cannot change file extensions (.html) and you cannot limit or change Windows because it does not add numbers etc. To to get more advanced features, we need to use Command Prompt and Windows Powershell.
Using the command line
batch-rename-files-open-command line
ren file * .html name * .html
batch-rename-files-cmd-prompt-change-name
batch-rename-files-cmd-prompt-change-extension
batch-rename-files-cmd-prompt-change-extension
batch-rename-files-cmd-prompt-change-extension
batch-rename-files-open-powershell
batch-rename-files-open-powershell
dir | % { $ x =} { Rename-Item $ _ -NewName "TestName $ x .html" ; $ x ++ }
batch-rename-files-windows-powershell-renameRename-Item
batch-rename-files-windows-powershell-rename
What the above command does is get all the files in a directory using the DIR command and go to “
Get-ChildItem * .html | Rename-Item -NewName { $ _ .Name -replace '.html' , '.txt' }
batch-rename-files-win-powershell-change-extension
Batch-rename-files-win-powershell-changed-extensionextension-batch-change-rename-files-win-powershellTo learn more about the Rename Item command, read
Microsoft documentation
for more definitions and examples.
Which of the three methods above do you prefer? Sure, Powershell can be overwhelming for beginners, but it’s fun to work with once you’ve gained some experience.
Hope this helps, but share your thoughts and other methods for manually renaming batch files. Is this article helpful?