Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要运行一个批处理文件,该文件遍历一个目录中的 700 多个文件并一个接一个地执行它们……但有 3 分钟的延迟。所有文件具有相同的扩展名,但文件名不同。所以它会执行第一个文件.....睡眠3分钟......然后运行目录中的下一个文件。
谢谢
只需使用普通循环并使用timeout等待:
timeout
for %%x in (*.extension) do ( start %%x timeout /t 180 /nobreak >nul )
你得到那个手册页是什么。一种带有向前笔划的有趣指定选项(用于路径名)......
我想你的意思是;
for x in (*.extension); do ./$(x); timeout 180 > /dev/null; done