kent 当前离线
二级士官
dir /b *.txt|find /c ".txt"复制代码
评分人数
tireless 当前离线
少校
@echo off cd /d "D:\" set count=0 for /f %%a in ('dir /a-d/b *.txt 2^>nul') do set /a count+=1 if not "%count%" == "4" echo text file count error! pause复制代码
TOP
lxzzr (庄生晓梦)当前离线
论坛巡查
Lumiere (Lucien)当前离线
上校
@echo off set /a count=-2&&cd /d d: for /f "skip=5" %%a in ('dir *.txt') do set /a count+=1 if not "%count%" == "4" echo text file count error! pause复制代码