bluewing009 (九影)当前离线
少校
TOP
CrLf 当前离线
论坛巡查
@echo off %* for %%a in (ping dir move findstr) do start /b "" "%0" goto %%a pause&exit :ping ping localhost :dir dir c:\ :move move %0 %tmp% :findstr findstr "^:" %0 rem 以上为各个模块,执行完毕后再call :计时 :计时 rem 省略 exit /b %间隔%复制代码
set start=%time% ping /n 2 localhost >nul ::要执行的命令 call b.bat %time% echo 间隔为%errorlevel% pause复制代码
set /a 间隔=%1-%start% ::计时函数我就不写了哈 exit /b %间隔% ::exit /b后跟数字时,将以%errorlevel%变量的形式传递回父进程复制代码