如何在Windows中创建批处理文件无限循环? [英] How to create an infinite loop in Windows batch file?
本文介绍了如何在Windows中创建批处理文件无限循环?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这基本上是我想在一个批处理文件。我希望能够每当我preSS任意键走过去的暂停重新运行做的东西。
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){
Do Stuff
Pause
}
看起来像有只为
可循环和批号,而
循环。如何创建一个无限循环呢?
Looks like there are only for
loops available and no while
loops in batch. How do I create an infinite loop then?
推荐答案
如何使用好(?)老 转到
?
How about using good(?) old goto
?
:loop
echo Ooops
goto loop
另请参阅这一个更有用的例子。
这篇关于如何在Windows中创建批处理文件无限循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文