Rename files using a list #

C:\temp>dir /b
89-bar.htm
a.htm
foo42.htm

C:\temp>type ..\list.txt
foo42.htm  001.htm
89-bar.htm 002.htm
a.htm      003.htm

C:\temp>for /f "tokens=1,2 delims= " %a in (..\list.txt) do ren %a %b
C:\temp>ren foo42.htm 001.htm
C:\temp>ren 89-bar.htm 002.htm
C:\temp>ren a.htm 003.htm

C:\temp>dir /b
001.htm
002.htm
003.htm

/windows | Sep 22, 2011


Subscribe or visit the archives.