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

Add hàng loạt member vào Distribution group trên MS 365

Owner tự quản lý member theo link: Exchange admin center   Add hàng loạt member vào Distribution group trên MS 365 Áp dụng cho cả mail-enabl...