The Dopefly Tech Blog

<< The Dopefly Tech Blog Main page

The Regex Mass File Renamer - Useful little things

posted under category: dotnet on December 25, 2005 at 1:00 am by MrNate

So, happy holidays all. Given a little extra time this morning, waiting for the in-laws to come back from shopping, I felt the need to rename some files. Ok, a lot of files. All of us CF guys can attest to the ease of getting it done in our favorite tag-based language, but what about running it without having to start 3 services on my local machine? That's where knowing a 2nd language fits in.

So, with an effort to (a) play with visual studio 2005, (b) test drive .NET 2.0, and (c) actually make something useful, I present to you the Regex Mass File Renamer. Install the .NET 2.0 runtime, it came out a couple months ago, download my app, and run the exe in the build folder.

It's not fancy, it's not all that great, but it's what I do in my spare time to make life just a little easier for myself. Choose a folder, enter a regular expression in the 2nd box, and something to replace it with in the 3rd, then hit start and it will change the filename (sans extension) of any files in the chosen folder.

Regex Mass Renamer
The zip file is my whole project folder from VS2005, so if you have Visual Studio '05, even the free (for a year) express version, you can open the project and play with the source.

Disclaimer: I won't claim to be any sort of OOP expert or great winforms programmer. The code may suck beyond belief. In fact, I'd like to know if it does. Use at your own risk. Make a backup of any files you plan on working with. The source is provided so that I cannot be held responsible with how the program works, or for anything that happens when running it.

Too old to comment!
On Dec 26, 2005 at 1:00 AM James Moberg (james has underestimated the power of said:
Check out Total Commander. It's a File Manager replacement with FTP, ZIP, file content compare, and a multi-file rename tool that has supported regular expressions (since Nov 2003) and a whole bunch of other awesome can't-live-without-em features.

On Mar 21, 2006 at 1:00 AM Jace ( said:
I hate you Nathaniel McGillicuddy James Barthomew Strutzenheimer.

I needed this last week and you made it 3 months ago and didn't tell me about it.

On Apr 28, 2010 at 1:00 AM Alexandra (mikan146, by way of said:
You should see Rename Maestro. it is a great <a target="_self" href="">file renamer</a> useful for any type of files. This can be your number one tool as well. It has kept my documents arranged all the time.
Too old to comment!