removing files under a certain size using batch
Posted on 2010-11-11
I am intetested in removing files under a certain size from any directory with a certain name. So for instance, I want the batch to search multiple drives for folders called "battlequest" and delete any files in those folders under a certain size. Below is an example of a working script that removes certain size files from a known path, perhaps that can help get you started.
thanks in advance
pushd "f:\Program Files\games\battlequest"
for %%j in (*.pk3) do if %%~zj lss 1043000 del "%%~j"