447219071 当前离线
二级士官
WHY 当前离线
上校
@echo off set s=" 0 字节$" "^找不到" " [1-9][0-9][0-9][0-9][0-9]* 字节$" dir /a-d /-c C:\A.txt 2>&1 | findstr /i /r /c:%s:" "=" /c:"% && call a.bat || call b.bat pause复制代码
评分人数
TOP
DAIC 当前离线
中将
@echo off for %%i in ("C:\A.txt") do ( if not exist "%%i" ( start a.bat ) else ( if %%~zi equ 0 ( start a.bat ) else if %%~zi gtr 1000 ( start a.bat ) else ( start b.txt ) ) )复制代码
@echo off set "z=0" for /f "delims=" %%i in ('dir /a-d /b C:\A.txt') do set "z=%%~zi" if %z% gtr 0 ( if %z% lss 1000 (call b.bat) else call a.bat ) else call a.bat pause复制代码