Chọn xóa các file theo dung lượng trong thư mục, link logo Tâm Anh

@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

Full các trường data có thể lấy từ AD on-prem

Mail Presence PermissionGrants Department ImAddresses Responsibilities AppRoleAssignments ...