here's a thought... if its a batch file youre only ever gonna run once (ie you dont need it to remember which number it was on then run it again and it remembers) its a peice of piss... you just use the SET command to define a variable, then SET variable = variable +1 and keep using that variable in the file and call it with %variablename
example... type SET at the command prompt and you can see all the pre-defined variables like PATH and stuff...