Saturday, April 23, 2011

How to Remove Numbers from Filenames

Let's discuss another simple task that can be automated with help of batch files. The task is to remove numbers from filenames like these:
name[1].ext
name[2].ext
name[3].ext
name[4].ext
name[5].ext
...
So what do you have to do? You can use a simple script like this:
@echo off for /f "tokens=1,2,3 delims=[]" %%a in ('dir /b *[1].*') do ren %%a[%%b]%%c %%a%%c
Hope you'll find it useful.

No comments:

Post a Comment

Translate