Bulk files rename batch

Microsoft Windows xp professional w/serv...
July 27, 2010 at 08:33:17
Specs: Windows XP
I want to rename files in the same directory with the same prefix but different file extension to a new prefix and a sequential number (i.e. A01, B01, C01....)

op2010_78128_32.aux, op2010_78128_32.tfw, op2010_78128_32.rrd, op2010_78128_32.tif

op2010_78129_32.aux, op2010_78129_32.tfw, op2010_78129_32.rrd, op2010_78129_32.tif

A01.aux, A01.tfw, A01.rrd, A01.tif
B01.aux, B01.tfw, B01.rrd, B01.tif

is this possible in a .bat file?

See More: Bulk files rename batch

Report •

July 27, 2010 at 10:04:31
Got it!

Had to create a .bat for each file (i.e. RenameSequentialBatchTIFXML.bat, RenameSequentialBatchAUX.bat,...) then copy the selected set to be converted to a file by itself (i.e 2010Aerials_A)
Then run .bat for each set.

Heres the code I found and modified:

@echo off
if "%1"=="GoTo" goto %2
%comspec% /v:on /c %0 GoTo start
goto eof
echo This program will sequentially rename all files.
echo Current directory is:
echo %CD%
echo This process is not reversible.
set input=
set /P input=Do you wish to continue [Y/N]?
if /I "%input%"=="Y" goto proceed
if /I "%input%"=="N" goto eof
goto input
for /R %%D in (.) do (
set N=0
for %%F in (%%~sD\*.FILE EXTENSION) do (
set /A N += 1
ren %%~sF A!N!%%~xF

PAIN in the A*@ I know, but it works better than renaming each by hand.

Report •

July 28, 2010 at 05:58:30
I also found a free software that handles bulk renaming, called 'Bulk Rename Utility.exe'. You can find it here:


Report •

Related Solutions

Ask Question