Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder, "myFolder". In "myFolder", I have many subfolders.

I know that if the subfolder is less than 10MB, it can be deleted.

Instead of checking the folder step by step, how can I write a batch job to help me delete just the folders?

share|improve this question
    
Yes, but surely you wish to delete files inside the folders as well. For all folders, by themselves, are smaller than 10mb. – Rook May 27 '10 at 2:19
    
yes, I mean....in "myFolder", there have many sub folders , and files. ONLY the files in the sub folders can be deleted. outside the sub folder, and inside the myFolder that can not be deleted. thz. – user28167 May 27 '10 at 2:22
    
This is really a message which belongs at stack overflow. The closest I could find was stackoverflow.com/questions/759481/… which at least gives you the directory size but has to scan each folder which is incredibly slow. You should use a scripting language. – Daisetsu May 27 '10 at 3:11

If this is a one-time operation, any tool that shows you the sizes of your subfolders will do.

The post How do I find the largest files and folders on a drive? gives you many tools (and more tools in this question).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .