Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the easiest and fastest way to remove underscores from folder names in Windows?

Running a Google search I found a VB script that automatically removes all underscores from file names in the current directory when run. It's simple enough. But it doesn't work with folders.

What I would like to do is to remove all underscore characters for all the folders in the current directory, so that instead of john_smith I get John Smith. How do I do that?

I know that there are hundreds upon hundreds of different batch renaming tools for Windows on the web. But most of the ones I have come across require that the user uses regular expressions to describe the problem and also to describe what the new name should look like. That's not very easy or user friendly.

Can you at least point me to a good batch renaming tool that's easy to understand, and that is able to rename folders? I don't want to randomly install and uninstall some useless bloatware.

share|improve this question
    
you should not be afraid of one using regular expressions. find _, replace with space. The regular expression to match an _, is you guessed it, _. The regular expression to match a space, is, you guessed it, space. Any tool that can rename folders, and uses regular expressions, will not be made harder by it using regular expressions. You just need a tool that is nice for you to use. –  barlop Jul 29 '12 at 19:48
    
@barlop You're absolutely right! I overlooked the "search for" and "replace with" fields in programs like muCommander, etc. But I have seen some complicated renaming tools that don't have any such text fields, where they expect you to describe everything with regular expressions, and not by any standard means - instead you have to use their own markers with certain characters within square brackets. But of course there are better programs, like Bulk Rename Utility mentioned below. –  sammyg Jul 31 '12 at 17:19
    
square brackets have a usage like if you want to specify a character range you can say [A-Z] or if you want a nice shorthand for saying "this character or this character or this character", then you can say [,;%] for one character that is comma or semi-colon, or percentage. But for an underscore, the complete regex to match an underscore, by "standard means" is just that, an underscore. No "special markers"!And if it took more than an _ to match an _,then it is not using regular expression syntax. I'd be surprised if you found a program that didn't match an _ with just an _.Especially regex –  barlop Jul 31 '12 at 17:45
add comment

3 Answers 3

up vote 3 down vote accepted

Bulk Rename Utility is a lightweight program that can accomplish this. In addition to supporting the use of regular expressions, it also has features to accomplish what you want in a more user-friendly way.

To use Bulk Rename Utility, install and start the program (there is also a portable version if you don't want to install it), and navigate to the folder that contains the folders you want to rename. Then, select all of the folders you want to rename.

In order to replace all underscores with spaces, in the Repl. (3) section at the bottom, type an underscore in the Replace box and a space in the With box.

Replace

In order to change the names to Title Case like in your example, use the Case (4) section. Choose Title from the drop-down menu.

Case

Look at the names in the New Name column and make sure that they are what you want. When you are done, click Rename in the lower-right corner.

share|improve this answer
    
That was very helpful. Thanks! I also tried using Free Commander and muCommander with successful results. I have used muCommander in the past for renaming files, but little did I know that it works with folders too. The Free Commander was new for me and it did what it was supposed to do. The muCommander is a little buggy, or it just feels laggy for renaming operations. –  sammyg Jul 31 '12 at 16:57
    
To compare with the example above, it's as if it first creates a new folder titled Elvis Presley on the same location as the old folder. Then it copies all the files from the old folder titled elvis_presley after which it would delete the files in the old folder and also delete the old folder itself, leaving you with a new folder with the new title, and with all your files in it, on the same location. That's "bulk renaming" a la muCommander way. It's terrible! –  sammyg Jul 31 '12 at 17:02
    
I noticed this behavior because I often got messages saying that there is already a file or a folder with that name on the same location when some bulk rename operation would go wrong, and it would ask if I want to overwrite the existing etc. I guess they somehow were trying to make it avoid having file or folder duplicate conflicts, but ironically that's exactly what their program is doing. It's not well thought out. I think it's due to the moving or copying of the files from one folder to another, instead of simply renaming the existing folder. They made it too complex. –  sammyg Jul 31 '12 at 17:07
    
I didn't have this problem with Free Commander though. Many of these "commander" style of file managers have a bulk-rename feature of some sort built-in that allow you to do some fast renaming of files (and folders). I wish that Explorer in Windows had some of this stuff built into it. But if not, I much rather prefer a stand alone renamer like Bulk Rename Utility (BRU). Thanks for the tip! So far I have used it couple of times now and it works great. I have not had much luck with these rename tools in the past, but I hope BRU will serve me well. Thanks again! –  sammyg Jul 31 '12 at 17:10
add comment

A Windows Batch file let you double click it which will quickly change underscores in a directory to something else.

Replace single character in windows filenames

share|improve this answer
add comment

You can also try http://www.binarymark.com/Products/BatchFileRename/default.aspx if you require more power and flexibility as it supports RegEx and EXIF tags.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.