Solved why doesn't my script work for removing larger than one mb?

May 18, 2016 at 12:59:32
Specs: Windows 7
@ECHO OFF

FOR /R "C:\Users\TSwanson\Desktop\WorkSite" %%F IN (*.*) DO (
IF "%%~zF" GTR "1048576" (ECHO DEL /F %%F))
pause > nul
EXIT /B /0

message edited by Latorys


See More: why doesnt my script work for removing larger than one mb?

Report •

#1
May 18, 2016 at 14:15:22
✔ Best Answer
You're using double quotes in your IF statement. That makes it a string comparison, and not a number comparison.
IF %%~zF GTR 1048576 (ECHO DEL /F %%F))

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question