Ruddzy, on 15 March 2012 - 01:15 PM, said:
however when i try and get a bit more inventive ....
It's not about being inventive, it's about not knowing some command syntax/not experimenting on command line.
Try executing in a command prompt:
then try again with:
DIr (without /b ) will have a "type" of output (NOT compatible with using the %%A variable), Dir /b will have another "type" of output.
And, in any case, you cannot remove the /F in the FOR command!
And, additionally the ~z won't work with "different from current" path.
In your posted example, what you want is most probably a .cmd (AND NOT a .exe) like:
FOR /F %%A in ('DIR /B "*.avi"') DO IF %%~zA LSS 20971520 ECHO DEL "%%A"
is there just to "protect the innocents"
This post has been edited by jaclaz: 15 March 2012 - 02:38 PM