
CODE: [Copy to clipboard]如果时间是早上10点至23点之间就执行特定的程序,不在这时间内继续执行后面的任务。但上面时间实际只能到22点,怎样才能准确点到23点呢?还有这段批处理还能简短一点吗?set i=%time%
if %i:~0,2% gtr 9 goto one
goto end
:one
if %i:~0,2% lss 23 goto two
goto end
:two
call test.exe
:end
……
CODE: [Copy to clipboard]说明:7点整必须写成" 7:00:00.00"if "%time%" geq "10:00:00.00" if "%time%" lss "23:00:00.00" start "" test.exe
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |