0

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?

jonsca
  • 4,077
  • 15
  • 35
  • 47
user28167
  • 551
  • 1
  • 6
  • 10
  • 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 02: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 02:22
  • This is really a message which belongs at stack overflow. The closest I could find was http://stackoverflow.com/questions/759481/batch-file-to-display-directory-size 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 03:11

1 Answers1

0

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).

Jan Doggen
  • 4,108
  • 10
  • 36
  • 51