View Single Post
  #5  
Old 02-29-2008, 10:52 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I've not really played with DOS batch files, but I was bored and did a bit of research:

Code:
for /r c:\ %%a in (*.eqg) do if %%~na.eqg == nektulos.eqg rename %%a %%~na.eqg.bak
Should rename any file called nektulos.eqg to nektulos.eqg.bak anywhere on your C: drive. This should work on Win2K/XP or Vista (I only tested it on Vista).

%%~na is equivalent to `basename` in Linux. I found this info from this link:

http://www.student.oulu.fi/~vtatila/batch_tutorial.html
Reply With Quote