Replacing and trimming characters in filenames using a batch file (windoze)
Posted on 2009-05-01
I'm trying to rename some mp3 files and would like to achieve two goals:
1. I want to replace underscores with spaces
2. I want to strip off leading track numbers
For example I would like to take the following filename:
"01 - This_Is_The_Title.mp3"
And convert it to:
"01 - This Is The Title.mp3"
And then to:
"This Is The Title.mp3"
The biggest problem is with stripping numbers off because they are not consistent. For example, I have files like the following:
01 - This_Is_The_Title.mp3
I could group similarly named files in directories without too much trouble to solve this and then hand sanitize the rest.
What do you think?