Delete files less than a specific size

前端 未结 6 1021
情书的邮戳
情书的邮戳 2020-12-18 12:55

I would like to delete all files that are less than a specific size in a directory. Does anyone know if there is a Windows command that will do this? something like de

6条回答
  •  攒了一身酷
    2020-12-18 13:31

    Try this from a batch script:

    @echo off
    setlocal
    for /f  "usebackq delims=;" %%A in (`dir /b *.pdf`) do If %%~zA LSS 3145728 del "%%A"
    

提交回复
热议问题