Click here to Skip to main content
Click here to Skip to main content

Mass Renamer

, 25 May 2007 CPOL
Rate this:
Please Sign up or sign in to vote.
A quick example of how to batch-

Screenshot - RenamerRun.png

Introduction

This code will recurse all files in a given folder and rename them based on the rules you fill out on the UI form. I wrote it because I was tired of people trying to get me to pay for a utility that did the same thing. It occurs to me that others may like to look at it or just use it. Either way, I need to give something back. This project is a complete working utility, although you could extend it and shore it up some.

Using the code

Using the code should be extremely easy, especially since it's scoped internal static. You don't even need to instantiate the core object. Simply begin to assign the properties of the object to set behaviors:

//
//  FileRecurser.REPLACE_TEXT_1_FLAG = true;
//  FileRecurser.FIND_TEXT_1         = txtFindText.Text;
//  FileRecurser.REPLACE_TEXT_1      = txtReplaceText.Text;         
//            

Once you have everything set, simply fire up the only method: RenameFiles.

//  
//  fire it up
//  FileRecurser.ReNameFiles(txtFOLDER.Text);
//

Points of interest

This is a very simple project. It's the kind of thing you say you are going to do everyday, but then never get around to it. It was inspired and written in a few hours; I have no doubt that it will be of use to someone out there. Keep posting!

History

  • 25 May, 2007 - This is version 1.0: Buyer beware! Use at your own Risk!!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

DumpsterJuice
Web Developer Consultant
United States United States
I have had a long and varied career...Today I program computers... someday, I hope to graduate to something much more respectable.

Comments and Discussions

 
GeneralGreat little tool (new feature) Pinmemberduffy2485-Jun-07 0:25 
GeneralRe: Great little tool (new feature) PinmemberDumpsterJuice8-Jun-07 1:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 25 May 2007
Article Copyright 2007 by DumpsterJuice
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid