September 1st 2010 – Version (2.3 Beta) is available. It adds the following new features:

  • A “Dry Run” mode. In this mode the application will only display and log the changes to the file/directory names without actually renaming the files and directories. This gives the user the ability to get an idea about what will be done before taking the plunge.
  • Fixes a bug where if a file or directory name contains only special characters, the renaming will fail and the recursive algorithm would try to keep going.

June 24th 2010 – Version (2.2 Beta). It adds the following new features:

  • Special characters could be removed from directory names as well.
  • It could be run in recursive mode that will allow renaming of all files and/or directories in all the sub-directories.
  • Removing all the dots in the file names but the last one that indicates the file extension.
  • The underscore is no longer considered a special character and it is not removed from the file names.


A few years ago I wrote a small application to remove all special characters from the file names of all the files in a directory.

Very often I would get a bunch of files that needed to be posted on a website and most of them would contain all kinds of special characters. I got fed up doing it manually- file by file, so I wrote this small app.

This is a Windows application written in C++ and works with win 98 and up. Of course Linux does not need anything like that, since you can do this with a quick one line shell command.

It only works with ASCII file names (sorry if you use any other language than English). I could have just as easily wrote it for UNICODE, but I had no need for that.

So, I decided to share it with anyone who wants to use it:

New v.2.3b: RenameFiles ver.2.3b
Old v.2.2b: RenameFiles ver.2.2 b
Old v.1.0:RenameFiles ver.1.0.

It is just a simple executable and does not need any installation. Keeping it simple is the key here. It also creates a log file in the same directory that the executable is in. The log file keeps track of the original file names and the new file names, so you can always find out what was done.

Quickly remove special characters from file names

105 thoughts on “Quickly remove special characters from file names

  • July 17, 2016 at 3:20 pm
    Permalink

    I see you don’t monetize your site,i read interesting article how to earn some extra cash and increase traffic
    using one simple method, just search in google for – Twardziel advices

  • July 20, 2016 at 7:02 am
    Permalink

    I am using v2.3b with Windows 10. I have the same problem as several others. I want to remove : colon characters from ASCII file names. The preview shows the file names After Change as I would expect them. If I untick the Dry Run box it says it cannot find most of the files, cause = 3. What does cause = 3 mean? One answer said the files could not be renamed because the files were in use. That cannot be right. I have had the same problem on two external drives. On the second I used the Windows safe recovery tool immediately after the errors. It said the drive could be removed, so it was not in use. Also the error message said not found, not in use. More importantly the log shows that the errors occurred BEFORE the change. The first time I tried on the second drive it did rename 11 files. There is then a single error line in the log, and no log for the names After Change. Subsequent attempts also showed only a single error in the log, even though a dialogue box appeared for every file in the directory and said it was not found. I can email the log if it will help.

    A more minor error is that it removes – minus/hyphen characters even though they are permitted.

    It would be a useful program if it worked.

    Best wishes
    Richard

  • July 20, 2016 at 10:06 am
    Permalink

    Is there a limit on the length of a file name which the program will handle? A file name with 54 characters was successfully renamed. A file name with 71 characters was not found.

    Version 2.3b with the preview stops renaming after the first error, although it continues to create dialogue boxes saying a file cannot be found. The earlier versions continue to rename files after errors, so they will rename a few more files.

  • July 20, 2016 at 6:39 pm
    Permalink

    In case it makes a difference I should add that both drives are formatted as FAT32.

  • September 3, 2016 at 6:01 pm
    Permalink

    I thought this was precisely what I was looking for, but discovered it doesn’t do what I needed – I’ve got a colon (:) in a file that came from Linux, and am trying everything to find out how to fix this. Here’s my log, ran into an error, reason 3. Dunno what that means, but you probably will!

    ——————————

    16:58:45 – 09.03.2016

    ——————————

    G:\

    ——————————

    File Names Before Change:

    ————————-

    G:\\$RECYCLE.BIN\

    G:\\2016-07\

    G:\\E-Books\

    G:\\RenameFiles2.3b.exe

    ————–ERROR——————Current directory: G:\File Screenshot – 07312016 – 12:10:47 PM.png not found, cause = 3

Leave a Reply

Your email address will not be published. Required fields are marked *


*