lyonamstrong 当前离线
列兵
GNU 当前离线
上尉
@echo off cd /d "%~dp0" for %%a in (*.txt) do ( if %%~za equ 0 ( del /f /q "%%a" ) )复制代码
@echo off cd /d "%~dp0" for /f "delims=" %%a in ('dir /b /s /a-d *.txt') do ( if %%~za equ 0 ( del /f /q "%%a" ) )复制代码
TOP
happy886rr 当前离线
等待验证会员
for %%a in (*.txt) do (set/a 1/(%%~za^) 2>NUL||del "%%a")复制代码
DiamondbacK 当前离线
上等兵
for /f "tokens=3*" %%I in ('dir *.txt ^| findstr /r /c:"^[^ ]"') do ( if %%I == 0 del "%%J" )复制代码