本文翻译自:How to sleep for five seconds in a batch file/cmd [duplicate]
This question already has an answer here: 这个问题在这里已有答案:
- How to wait in a batch script? 如何在批处理脚本中等待? [duplicate] 6 answers [重复] 6个答案
Windows's Snipping tool can capture the screen, but sometimes I want to capture the screen after five seconds, such as taking an image being displayed by the webcam. Windows的Snipping工具可以捕获屏幕,但有时我想在五秒钟后捕获屏幕,例如拍摄网络摄像头显示的图像。 (Run the script and smile at the camera, for example.) (例如,运行脚本并对相机微笑。)
How do I sleep for 5 seconds in a batch file? 如何在批处理文件中睡5秒?
#1楼
参考:https://stackoom.com/question/713C/如何在批处理文件-cmd中休眠五秒钟-重复
#2楼
Well this works if you have choice or ping. 如果您有选择或ping,这是有效的。
@echo off
echo.
if "%1"=&#