Command line 运行.bat文件时,在X秒后运行文件

Command line 运行.bat文件时,在X秒后运行文件,command-line,Command Line,我想知道当我运行.bat文件时,是否有任何方法可以在X秒后运行文件 我已经搜索了一个例子,但没有帮助 @echo off sleep 10 start "C:\file.txt" exit 谢谢 您可以使用以下功能: C:\> timeout 10 bat文件类似于: @echo off timeout 10 start "C:\file.txt" exit 根据我经常使用的BAT文件: REM - Wait 10 seconds CHOICE /C:AB /T:10 /D:A &g

我想知道当我运行.bat文件时,是否有任何方法可以在X秒后运行文件

我已经搜索了一个例子,但没有帮助

@echo off
sleep 10
start "C:\file.txt"
exit
谢谢

您可以使用以下功能:

C:\> timeout 10
bat文件类似于:

@echo off
timeout 10
start "C:\file.txt"
exit

根据我经常使用的BAT文件:

REM - Wait 10 seconds
CHOICE /C:AB /T:10 /D:A > NUL

我不记得是从哪里弄来的,可能是超级用户。不过,我已经使用多年了。

你怎么能给我hole.bat代码?这不起作用,伙计,我尝试这个@echo off timeout 5 start“C:\Program Files(x86)\Internet Explorer\iexplorer.exe”退出但不起作用