Most of us use our computer nowadays to store a large number of files. These can be photos, songs, videos, documents as well as other files. Let’s take a situation when you copied a large number of photos from a camera to your computer running Windows. Most of the time these photos have weird names set by the camera and let’s say you want to rename all of them at once. So, how can we do that?
Also read: – How to delete Large folders at Once with CMD
How to batch rename files in Windows
You can batch rename files in Windows either using Windows Explorer, or Command Prompt, or Power Shell, or by using a Third party application. Here’s a brief description on each of the above-mentioned methods :
The easiest way to batch rename files in Windows is by using the Windows Explorer with which you browse all the files and folders stored on your computer.
- First of all, open up the Windows Explorer and go to the folder that contains all the files that you want to rename.
- Select the required files either by selecting with a mouse while holding the Control key down or by using the Control + A shortcut if you want to select all the files in that folder.
- Now, right-click the first file in the selection and select Rename.
- Rename with the name you want so that the files are renamed to YOUR_GIVEN_FILE_NAME (1).jpg, YOUR_GIVEN_FILE_NAME (2).jpg, YOUR_GIVEN_FILE_NAME (3).jpg,…..etc .
The second way to batch rename files is by using command prompt in Windows. We can rename files in command prompt by using the rename command. It can even be used to batch change the extension of files, something which you can’t do with the previous method.
- To batch rename files using the command prompt, open the command prompt first by right-clicking in the folder in which all the files you want to rename reside while holding down the Shift key and then selecting “Open command window here”. This opens up the command window.
- Now, enter the rename command in the window and hit enter to rename the files. You can use the * wildcard to select multiple files. The command to rename all the jpg files in the current folder to png extension is as follows :
rename *.jpg *.png
Power Shell is just like a more advanced command prompt. In Power Shell, we can pipe the output of one command to another just as we do in Linux or Unix systems. In the below method, we pipe the output of Dir command which lists all the files in a directory to Rename-Item command that renames the file as we require. The following are the steps of using this method :
- Open the Power Shell from the start menu.
- Use the cd command to go to the folder in which your files are. For example, you can use the following to change the directory to D:\myfolder :
- Now, rename the files using the Dir piped with Rename-Item command. The following command renames the ‘0’ (zero) character in file names by an underscore.
- The Rename-Item command has advanced options which you can apply according to the result that you want to achieve.
Third Party Application
If you want advanced options for batch renaming files other than the one provided by Windows Explorer but you don’t want to mess with the command prompt as well, then using a third party application might be better for you. Bulk Rename Utility is an application for Windows to batch rename files and it’s free to download. It has many advanced options such as numbering, remove, replace and add characters which you can use according to your requirement to rename the files. You can see the preview of your changes in the New Name column. Click Rename button to rename the files.
A technology enthusiast.