How-To Geek

How to Batch Rename Files in Windows: 4 Ways to Rename Multiple Files


Windows comes with a variety of ways to rename multiples files at once from Windows Explorer, the Command Prompt, or PowerShell. Whether you’re looking for an easy-to-use graphical interface or a powerful command-line method, you’ll find it here.

The Windows Explorer method is fast, but lacking in flexibility. PowerShell is extremely flexible – but it can be intimidating if you’re new to PowerShell. If you’re looking for a powerful graphical interface, a third-party utility is your best bet.

Windows Explorer

Windows Explorer has a quick, built-in way to rename multiple files at once, although it’s pretty well hidden.

To get started, locate the files you want to rename and place them in the same folder. Use the columns at the top of the list in details view to order the files how you’d like them – Windows Explorer will number the files starting from the top at the list.


Select all the files you want to rename, right-click the first one and select Rename. Type your desired base file name and press Enter.


Windows Explorer will take your base name and add a number to each file’s name. This method is good for cleaning up messy names, although it isn’t very flexible.


Command Prompt

You can use the rename – or ren – DOS command in a Command Prompt window to rename multiple files at once. It accepts the wildcard character – * – to match multiple files. The quickest way to open a Command Prompt window at your desired location is to hold Shift, right-click in the folder, and select “Open command window here.”


The most obvious use case for the rename command is changing multiple file extensions at once – something you can’t do in Windows Explorer. The following command will rename all .html files in the current folder to .txt files:

ren *.html *.txt


This command doesn’t offer a lot of power on its own, although it can be integrated into more complex batch scripts.



PowerShell offers much more flexibility for renaming files in a command-line environment. Using PowerShell, you can pipe the output of one command – known as a “commandlet” in PowerShell terms — to another command, just like you can on Linux and other UNIX-like systems.

The two important commands you’ll need are Dir, which lists the files in the current directory, and Rename-Item, which renames an item (a file, in this case). Pipe the output of Dir to Rename-Item and you’re in business.


After you launch PowerShell, use the cd command to enter the directory containing your files. You should put the files in their own directory so you don’t accidentally rename other files.


For example, let’s say we don’t want the space character in our file names – we’d rather have an underscore instead.


The following command lists the files in the current directory and pipes the list to Rename-Item. Rename-Item replaces each space character with an underscore.

Dir | Rename-Item –NewName { $ –replace “ “,”_” }

imageReplace the “ “ and “_” parts of the command to replace other characters in file names.image

Consult Microsoft’s documentation on the Rename-Item commandlet if you want  help performing other, more advanced operations.

Third-Party Utilities

If you need a powerful way to rename multiple files at once — without messing with the command line – you’ll want a third-party utility. Jason Fitzpatrick previously wrote about Bulk Rename Utility, his favorite. Bulk Rename Utility has a cluttered-looking interface that exposes the huge amount of options you’d normally achieve with regular expressions and complicated command-line options.

After installing the tool, navigate to the files you want to rename and select them.


Change some options in one or more of the panels and you’ll see a preview of your changes appear in the New Name column. For example, let’s say we want to remove everything but the number and just have numbered image files. We can set the Remove panel to remove the first 10 characters and the last 1 character.


Click the Rename button to rename the files.

Do you prefer a different batch rename tool? Leave a comment and let us know about it.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 04/23/12

Comments (25)

  1. patrick

    Total Commander contains a bulk rename utility too. Although not as intimidating as Bulk Rename Utility, it offers a lot of options to rename file: use date / time in the name, use counter, search & replace, regular expression, change case and probably a lot more that I don’t use. You can even add extra plugins to that.

    Downside is that TC is not free, but if you have it (it’s well worth it’s price), you probably don’t need an extra tool. Just select your files in TC and press CTRL-M

  2. Mauricio

    FreeCommander is free, it substitute the Windows Explorer with two panels and have very good rename options for multiple files, a decompress zipped/rar files, a compare and backup folders. and many more utilities…

  3. LadyFitzgerald

    IrfanView is a free, easy to use batch rename utility that also is capable of doing batch edits of graphic files that I’ve been using it for years for doing batch file renaming and batch graphic editing, mostly brightness and contrast although it is capable of far more. It does everything the above programs do.

    My Fujitsu ScanSnap S1500 ADF scanner does a fairly decent job of scanning color to JPEG but the results are slightly faded looking. Often the originals are also faded (old comic books, for example). I’ve found IrfanView quickly does an excellent job of quickly correcting the scans, often even restoring faded inages to their original brilliance.

  4. totoro

    Ant Renamer is another good rename utility tool. I use it to rename thousands of file for calculating timelapse with Virtualdub.

  5. Wesley

    I personally like Advanced Renamer What I particularly like is the ability to save the regular expressions for reuse and the flexibility of the regular expression editor.

  6. Mick-H

    I have been using “NameWiz” for many years now, and it allows renaming of files and folders.

  7. Bruno

    In my opinion, ExplorerXP has the best bulk renaming system. At the very least, it fits my need perfectly. It’s a shame it’s abandoned. It takes a few tweaks for it to work in Windows 7.

  8. MGtrek

    While I use “Bulk Rename” a lot, I use Excel and Notepad to help me create batch files for the really complex name changes. The big plus there, is that I can use command line apps that can also help me change tags in MP3 or picture files.

    I start by doing a “dir /b >changename.bat” file. That just lists the file names and no add’l info. Grab that output and toss it into Excel. From there, I add a column of “REN” for the rename command (or whatever other command line program I’m using. Then columns for each switch in the command line. Create one more column and do a concatenate function followed by a “paste special” so that it is the actual entry. A quick cut/paste back into changename.bat, a little cleanup, and I have my custom rename ready to go.

    Hint… If you have to surround the file name with quotes, it wreaks havoc in the Excel part. So I just use qqq where I want a quote, and do a replace all in Notepad to cleanup the bat file before running.

    It may sound like a lot of work, but when I was finished ripping all of the recordings of our chorus (for the last 30 years), I used this to create an MP3 renaming, and tagging batch file. It took me about 10 minutes to write it and 2 minutes to run it. After that, all 784 songs were renamed and tagged!

  9. Jan Holtman

    I prefer metamorphose. Use either the slightly older version 1.1.1 or the new version 0.8.2

  10. Bruce

    I’ve been a registered user of Flash Renamer for years.
    One of the things i like is the display window with its ‘before’ and preview of the ‘after’ file names. Helps to make sure I’ve set the parameter(s) properly.

    Also, it has an Open and Load Selected files which helps to get just the files I wish into the action.
    And I also can drag and drop files found from other tools (search Everything, for example) into its active rename zone.

  11. Out_Cold

    I typically download files with different naming conventions. Is it possible to use powershell or one of these batch programs to remove periods without wrecking the extension? Like to some_file_name.jpg or some file name.jpg. I would attempt it manually but there are thousands of files.

  12. LadyFitzgerald

    @ MGtrek. If you used a good renaming utility (several have been mentioned here; I personally prefer IrfanView), you wouldn’t have to waste time creating batch files for each job. It takes me only a few seconds to tell IrfanView what I want it to do and it takes IrfanView only a minute or less to rename the files. There is a small learning curve to use IrfanView to its full potential but it is less than writing batch files all the time and I was able to do simple renaming jobs right from the start.

    There are also plenty of applications that will make adding and changing tags in mp3 files much easier and faster.

  13. ediz

    I have been using siren.exe for many years to rename my photo files, with great success.

  14. vicsar

    I use Total Commander :-) or Lupas Rename 2000, depending on the task at hand.

  15. grellanl

    I’ve been using a tool called “Renamer” from den4b.

    Find it a really good tool, you can stack rules in sequence to get a lot of the flexibility that I would previously have used the command line for, piping names through sed or awk to clean them up. But it’s super simple to use, and I rarely bother scripting bulk renames anymore. Very handy for cleaning up directories of MP3s or holiday photos.

  16. mmg1818
  17. Byron

    I also love the Batch Rename Utility. While the interface is damn scary at first look, it turns out to be pretty self explanatory once you use it a bit. I use it a lot for when Windows, in its abject stupidity, drops leading zeros out of long lists. This really messes up how REAL programs deal with long numbered lists (in fact, I just tend to hate it when Windows tries to “help” on anything; drag n drop in Windows Explorer can be an ugly game of ‘Catch me! Oops, you missed, heehee’).

  18. KeithG

    I use Lupas Rename 2000 (

    Clean, simple, supports EXIF Tags from pictures.

    It hasn’t been updated in a while, and is 32bit so the Explorer context menu doesn’t work with x64, but even with that, it’s a great program.

  19. Chris Hoffman


    I believe that should be possible, but it would require some regular expressions. I’m not much of a regular expression wizard, personally.

  20. Terence

    Hi Folks,

    Im using Bulk Rename Utility. However, I notice that it doesnt rename the file names in the details. Any workaround? Please advise. Cheers!!

  21. astralcyborg
  22. Chris Hoffman


    Well, you have to select the files you want to rename first — that could be it. It’s a bit of a confusing interface.

  23. Dave

    I am experiencing two different results when attempting this on two different OS’s. I need to have my file name end up looking like “filename(1).jpg”. Batch re-naming works on Windows 7 but when I attempt to do the same thing on XP it always ends up “filename (1).jpg”. I can’t seem to get rid of that space between the filename and (1) in XP. Any ideas?

  24. Chris Hoffman


    Not sure, I imagine that’s just the way it works in XP — you can always remove the space later with a third-party batch renaming tool (see the end of the article.)

  25. TSU_Tech

    Thank you for this!

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!