如何防止执行批处理文件后控制台自动关闭 [英] How to prevent auto-closing of console after the execution of batch file
本文介绍了如何防止执行批处理文件后控制台自动关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在批处理文件的末尾放置什么命令来防止在文件执行后控制台自动关闭?
What command can I put at the end of a batch file to prevent auto-closing of the console after the execution of the file?
推荐答案
在 Windows/DOS 批处理文件中:
In Windows/DOS batch files:
pause
这会打印一个很好的按任意键继续......"
消息
This prints a nice "Press any key to continue . . . "
message
或者,如果您不想要 按任意键继续..."
消息,请改为执行此操作:
Or, if you don't want the "Press any key to continue . . ."
message, do this instead:
pause >nul
这篇关于如何防止执行批处理文件后控制台自动关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文