Suppose you need to rename two or three files in Windows. You will not mind clicking a couple of times and typing in similar or identical information, right? However, it will quickly become tedious if you have to do this ten times or more or have many files that you need to rename.
You have probably wondered if there is a quick way to rename multiple files in Windows 10. Well, the answer is yes. There are several ways to do it.
This article shows you how to batch rename files using Command Prompt and File Explorer. Let’s get started.
How to Bulk Rename Files using Command Prompt
Command Prompt is a unique tool in Windows that allows you to execute commands, repair files, run batch files, and launch scripts within Windows. As long as you know the proper syntax, you can do incredible things, like managing/repairing disk partitions, executing programs, and even renaming files in batches. Here’s how to use the Command Prompt to bulk rename files in Windows.
Note: PowerShell is not the same as Command Prompt, and some commands do not work. Quotations used for spacing in filenames are one example that doesn’t work in Powershell. This section is for Command Prompt only, unless you type “cmd” and press “Enter” while in PowerShell.
Bulk Renaming Files: Add More Text and Less Characters using Command Prompt
This process uses “?” to determine how many characters you want to keep in the original part of the name. It also uses “*” as a wildcard for the filename so that it includes all of them that have the specified file extension (.jpg or whatever you select).
- Launch “Command Prompt,” then type “cmd” in the Cortana Search Bar. You can also press “ (Windows Key) + R” and type it in.
- In the Command Prompt, navigate to the desired folder that contains the files that you want to rename. Type
cd [drive letter]:[folder 1][folder2]or whatever number of folders the path requires. Replace the brackets with the correct names, such as
dirto list all files in the specified location so that you can verify what you want to rename.
- Next, type
ren *.[file extension] ???[add-on text here].*but replace the bracketed sections and choose how many “?” to add. Using “???” keeps the first three original characters, “????” keeps first four, etc.
Add as many “?” as you like. You can go over to match the longest filename, so ten question marks keeps any characters that fall under ten in every filename.
ren *.docx ??????-Windows-Notes.*renames all “.docx” files, keeping the first six characters and adding “-Windows-Notes” to the end.
dironce more to review and confirm the changes. Since the example included six “?,” the first six characters remain. Also, the add-on text appears at the end of each file.
Trim Multiple Names
You might want to make the file names shorter and bring more simplicity to the equation. Here is how to trim multiple characters simultaneously.
For instance, you may have .jpg files that need trimming with names that have already got customized.
- Inside the target directory, you can use the ren*.* ??????.* function.
This function will trim the original photos to the number of characters designated by the question marks.
This example will turn a file named “mountain_trip.jpg” into “mounta.jpg.” Of course, if the file name is six characters or less in length, it will remain the same. This process is beneficial where short file names are better than long ones.
Modify Multiple Names
If you want to rename a specific part of multiple filenames with similar names, here’s how to do it.
- Again, navigate to the directory in question using Command Prompt.
- Now, to rename multiple filenames that all start with “vacation_2019” so that they start with “vacay_19,” this is the command that you need to use: ren vacation_2019*.* vacay_19*.*
This option is a handy command for shortening file names.
Change Files with Specific Extensions
Suppose that you have various file types within a folder, and you want to rename the ones with the .jpg extension. Command Prompt makes this very easy. For example, you want to rename all files titled “vacation_2019” to “vacay_19,” but only those with the .jpg extension. Here’s how to do it.
- Start by navigating to the path in question.
- Then, type ren vacation_2019*.jpg vacay_19*.jpg and hit “Enter.”
This command will rename all said filenames, like the one above, but it will only do so for .jpg files.
Sometimes, you may want to change file extensions for multiple files. You could do this by using the process mentioned above to change name parts, but there is an easier way to go about things here.
- Once in the desired directory, type in ren *.jpg *.png and hit “Enter” to change all .jpg files to .png files, for example.
You can do this for all available extensions.
Batch Rename Files using File Explorer
The File Explorer in Windows 10 offers a handy feature to rename multiple files. It’s very straightforward and approachable. The only drawback with this method is that it adds “(#)” to the end of each filename where “#” represents numbers, such as “2021 Summer Vacation (1), 2021 Summer Vacation (2), etc.
You can only add “(#)” and not change the name. Therefore, you should change one of them to what you like, then use this process. Let’s assume that you know how to rename a single file and get started on multiple files immediately.
Renaming Multiple Files at Once
- Start by navigating to the folder where you want to rename multiple files. If within this folder, you are certain that you want to rename all files, either use the “Right-click + Drag” command to select them all or just use the “Ctrl + A” shortcut to have them all selected automatically.
- Alternatively, if you need to choose specific files, hold down the “Ctrl key” and click the files you want to select separately. If there are many files on the list, and very few of them you do not want to rename, select them all, hold down the “Ctrl key,” and click the files you want to de-select.
- Similarly, you can use the “Shift key” to select a range of files.
- Once you have selected every single file that you want to rename at once, right-click any of the selected files and then click “Rename” from the menu that pops up.
- Type in the desired name that you want to appear on all files and hit “Enter.” You will note that every single one of the files that you have selected has been renamed to the name you have chosen, the only discrepancy between them, being the added numbering, such as (01), (02), etc.
If this is not what you wanted to do, or you are dissatisfied with the results and would like to try the Command Prompt solution, hit “Ctrl+Z” to undo the renaming. This action immediately reverts the files to their previous names.
Although renaming multiple files via File Explorer is quick, easy, and user-friendly, it does not offer a vast array of options. If you are going for option diversity, use Command Prompt. It might not seem easy, but it becomes such once you get the hang of it.
1. Can I undo the Batch Rename if I don’t like the results?
Whenever you use the File Explorer method to batch rename files, you can use the undo function. Command Prompt and PowerShell do not include any undo functionality. Hit “Ctrl+Z” before touching anything else on your keyboard, and the changes become undone. Some users report that the undo function has a short time limit, so undo it as quickly as possible.
2. Are there any risks to batch-renaming?
In itself, batch-renaming is not risky. If you change a file name or an extension of a file that is essential for a program or the OS to function, you can mess things up.
Batch-renaming presents a greater risk than regular renaming because there are more things you can overlook.
3. Do you recommend any thitd-party tools to bulk rename files?
With the limitations of File Explorer and the complexities of Command Prompt file renaming options, third-party tools and apps have evolved that combine the best of both worlds. However, the one thing that you need to know about these programs is that they are not always renaming-specific. Bulk renaming often gets introduced as just a feature.
Still, renaming multiple files using Command Prompt is a good starting point. The use of Command Prompt stretches far beyond mere renaming usage, so knowing your way around it is always desirable. Plus, it is a steppingstone for coding if you are into that.
In closing, File Explorer and Command Prompt come with downsides and upshots. If you are looking for a simple renaming method without requiring too much tweaking, use File Explorer—it’s simpler and quicker. If you need any advanced bulk renaming done, Command Prompt should be your go-to tool unless you want to deal with third-party apps.
Hopefully, this guide helps you learn more about batch-renaming and provides the tools to organize your files better. While renaming files one by one is tedious and time-consuming, bulk renaming files is certainly a time-saver, especially with the busyness of today’s world.