Batch file script to remove special characters from filenames (Windows)
- by njreed.myopenid.com
I have a large set of files, some of which contain special characters in the filename (e.g. ä,ö,%, and others). I'd like a script file to iterate over these files and rename them removing the special characters. I don't really mind what it does, but it could replace them with underscores for example e.g.
Störung%20.doc would be renamed to St_rung_20.doc
In order of preference:
A DOS batch file
A Windows script file to run with cscript (vbs)
A third party piece of software that can be run from the command-line (i.e. no user interaction required)
Another language script file, for which I'd have to install an additional script engine
Background: I'm trying to encrypt these file with GnuPG on Windows but it doesn't seem to handle special characters in filenames with the --encrypt-files option.