Screenshots
The Renamer using a simple modified date replacement and sorting by modified date.
The Renamer using multiple functions including an incrementing number placeholder.
The Renamer with the contextual help turned on.
The Renamer settings.

Renamer

(download)
v1.0.2.0

Note: Requires Microsoft .Net Framework 4


A batch file renamer. The Renamer performs the given renaming functions and displays a preview of the new file names. The renaming changes can then be committed.

Renaming functions include Insert, Replace, Replace At, and Title Case. Custom renaming functions may be added through MEF (Managed Extensibility Framework). More information on custom renaming functions is below.



Renamer also has contextual help (F1).


Technical Information

Renamer is a C# WPF application using MEF.


Favorite Directories

Favorite directories can be added to the application via adding a Config.xml file to the application's directory. Remote directories can also be added.

Sample Config.xml: (download)

<?xml version="1.0" encoding="utf-8"?>
<root>
  <FavoriteDirectory path="\\remote_machine\folder" description="Remote Folder" />
  <FavoriteDirectory path="C:\folder" description="C Folder" />
</root>


Custom Renaming Functions

If you can write .Net code (Visual C# 2010 Express download) then you can add custom renaming functions to the renamer via MEF (Managed Extensibility Framework).


  1. Create a C# .Net Framework 4 Class Library.
  2. Add a reference to System.ComponentModel.Composition.
  3. Add references to Renamer.exe.
  4. Use the sample class file below to create the renaming function.
  5. Build the library.
  6. Copy the resulting dll to the same directory as the Renamer executable.
  7. Run the Renamer executable and your renaming function will be included.

Contact me if you need further assistance.


A control will be added to the renaming function for every value in the ControlKeys enum. The SetControl() calls set up the type (textbox, checkbox, or combobox) and initial value for each control. The values of comboboxes are also defined by an enums. PerformFunction() performs the renaming function.
Note: all the NameText and HelpText attributes are optional.

SampleFunction.cs: (download)

using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using Renamer.Attributes;
using Renamer.RenameFunctions;

namespace SampleNamespace
{
    [Export(typeof(RenameFunctionBase))]
    [NameText("Sample"), HelpText(@"The sample renaming function.")]
    internal class SampleFunction : RenameFunctionBase
    {
        private enum ControlKeys
        {
            [NameText("Text Box"), HelpText(@"The textbox control.")]
            TextBox,

            [NameText("Check Box"), HelpText(@"The checkbox control.")]
            CheckBox,

            [NameText("Combo Box"), HelpText(@"The combobox control.")]
            ComboBox
        }

        private enum ComboBoxKeys
        {
            [NameText("Option 1"), HelpText(@"The 1st combobox option.")]
            Option1,

            [NameText("Option 2"), HelpText(@"The 2nd combobox option.")]
            Option2,

            [NameText("Option 3"), HelpText(@"The 3rd combobox option.")]
            Option3
        }

        public SampleFunction()
        {
            this.SetControlKeys<ControlKeys>();
            this.SetControl((int)ControlKeys.TextBox, "Initial Text");
            this.SetControl((int)ControlKeys.CheckBox, true);
            this.SetControl<ComboBoxKeys>((int)ControlKeys.ComboBox, ComboBoxKeys.Option2);
        }

        public override void PerformFunction(RenameFunctionArgs args)
        {
            // args.OriginalExtension - the original extension of the file.
            // args.OriginalFileName - the original name of the file.
            // args.WorkingName - the working name of the file for renaming functions
            //                    (may or may not include the extension).
            // args.WorkingNameIncludesExtension - true if processing includes the file extension.

            string textBoxValue = (string)this.GetControlValue((int)ControlKeys.TextBox);
            bool? checkBoxValue = (bool?)this.GetControlValue((int)ControlKeys.CheckBox);
            ComboBoxKeys comboBoxValue = (ComboBoxKeys)this.GetControlValue((int)ControlKeys.ComboBox);

            string workingName = args.WorkingName;

            // Do logic on the working name

            args.WorkingName = workingName;
        }
    }
}


Change Log

v1.0.2.0
01/08/2014
  • Added checks for CLR loading invalid (old) assemblies. This will occur if old KurokiApps dll files are in the same directory as the application.

v1.0.1.0
12/15/2013
  • New single executable design (dlls are compiled into the exe).
  • Added logic to automatically update the application.

v1.0.0.1
05/04/2013
  • Rebuilt along with other applications.

v1.0.0.0
01/04/2013
  • Initial release.