简体   繁体   English

批处理命令文件窗口

[英]batch command file windows

if there is any way to run notepad if something was copied and make it checking every 5 minutes? 是否有办法运行记事本(如果已复制某些东西并每5分钟检查一次)?

for %%F in (1 2 3 4 5 6 7 8) do (
    xcopy /e e:\%%F  f:\
)

I am not sure how to complete the first part of your question but to time out for 5 mins you could use a code similar to this: 我不确定如何完成问题的第一部分,但是要超时5分钟,您可以使用类似以下的代码:

echo CODE
echo Sleep 5 mins
TIMEOUT /T 300 /NOBREAKS
echo MORE CODE

Obviously change 300 to the number of seconds you desire if 5 mins is too short/long! 如果5分钟太短/太长,显然要将300更改为所需的秒数!
I would also suggest not using a batch file for this if you can! 如果可以的话,我也建议不要为此使用批处理文件!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM