How to create an infinite loop in Windows batch file?

前端 未结 6 2229
遥遥无期
遥遥无期 2020-11-28 02:50

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\".

while(true){
            


        
6条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 03:19

    How about using good(?) old goto?

    :loop
    
    echo Ooops
    
    goto loop
    

    See also this for a more useful example.

提交回复
热议问题