How to create an infinite loop in Windows batch file?
This is basically what I want in a batch file. I want to be able to re-run «Do Stuff» whenever I press any key to go past the «Pause».
Looks like there are only for loops available and no while loops in batch. How do I create an infinite loop then?
6 Answers 6
How about using good(?) old goto ?
See also this for a more useful example.
Unlimited loop in one-line command for use in cmd windows:

A really infinite loop, counting from 1 to 10 with increment of 0.
You need infinite or more increments to reach the 10.
This could be useful if you need a really infinite loop, as it is much faster than a goto :loop version because a for-loop is cached completely once at startup.