Created
July 21, 2015 23:50
-
-
Save dd86k/b9cead0157cfb04615fe to your computer and use it in GitHub Desktop.
Clean files under 2 MB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM Written by DD~! | |
REM Loop within the files, current directory | |
FOR %%A IN (*) DO ( | |
REM If the file isn't the script file (filename) | |
IF NOT "%%A"=="%~nx0" ( | |
REM If the file is under 1 MB, delete it | |
IF %%~zA LEQ 2097152 DEL /Q "%%~A" | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment