@echo off
setlocal
:: Size is in bytes
set "max.size=100000000"
for /f "usebackq delims=;" %%A in (`dir /b /A:-D *.*`) do If %%~zA GTR %max.size% del "%%A"
Tạo file *.cmd cho vào thư mục cần xóa file
*.* mask cho các file cần xóa
EQU : Equal
NEQ : Not equal
LSS : Less than <
LEQ : Less than or Equal <=
GTR : Greater than >
GEQ : Greater than or equal >=
Tham khảo: https://stackoverflow.com/questions/39646194/deleting-files-smaller-than-a-certain-size-with-batch

No comments:
Post a Comment