^^Yes that was so obvious--thank you!
Now that this works, I have another issue that I would like to correct with this batch program.
I have the following directory structure where this batch file will be executed:
DIR1
DIRA
DIRB
DIRC
DIR2
DIRD
DIRE
DIRF
DIRG
DIR3
DIRH
DIRI
When run, it deletes DIR1 and DIR3 and only keeps DIR2 because it is the largest directory. What I'd like the result to be is as follows:
DIR1
DIRC
DIR2
DIRE
DIR3
DIRH[code]
In other words, I want to keep all folders in the root directory where the batch file located and only keep the smallest directory within each of the subdirectories.
Is this possible? If not, then what I'd have to do is copy the batch file into each of the main root folders (DIR1, DIR2, DIR3) and run it each time in each of those folders.
Any further (and final) help would be very helpful.