I'm trying to run a simple batch file:
@echo off <-- don't print this line or any of the preceeding lines to the console window.
pushd "K:\" <-- in the quoted directory
for %%j in (*) <-- for every file in the directory
do
if %%~zj <-- if the size of the file
lss 37000 <-- is less than 37k
del %%j <-- delete the file
popd <-- go back to original directory.
I start getting an error at the @echo off
and pushd
, but if I try pushd
in cmd.exe
it runs just fine. I'm sure I'm missing something simple.
Any ideas?
@echo off
andpushd
. i get " the system cannot find the file specified" , when it gets to the loop, it closes the cmd window..