arrays - How do I increment a DOS variable in a FOR /F loop? - Stack Overflow
I would like to add that in case in you create local variables within the loop, they need to be expanded using the bang(!) notation as well. Extending the example at http://stackoverflow.com/a/2919699 above, if we want to create counter-based output filen...