我使用的是Windows2002版本。我有一个bat文件要在这个版本上运行,但是当它执行命令timeout /t 35时,它给出了一个错误'timeout' is not recognized as internal or external command, operabable proggram or batch file
我的代码:
ECHO Start Firefox Starts start /B "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" imacros://run/?m="login-google-adwords.iim" timeout /t 35
我可以用什么来延迟?
谢谢
发布于 2015-07-10 03:05:14
在服务器2008中。超时和ping都位于C:\Windows\System32中
因此,如果将超时命令设置为C:\windows\system32\timeout /t 5 /NOBREAK,则超时命令将起作用
发布于 2014-12-11 15:08:17
ping超时只占用很少的CPU,运行良好。
试试这个:
ping -4 -n 35 "">nul发布于 2014-12-11 16:43:28
如果您不喜欢建议使用ping,因为它很难看,请考虑在批处理文件的末尾添加以下内容:
@goto :eof
:timeout
:: use ping to delay for the number of seconds passed as an argument
@ping -n %1 127.0.0.1 > nul
@ping -n 2 127.0.0.1 > nul
@goto :eof然后,在批处理文件中,您可以执行以下操作
call :timeout 10延迟指定的秒数。
https://stackoverflow.com/questions/27416234
复制相似问题