Hi,
I need a batch to run and check if a total size of a c:\sample (subdirectory and files included) is less than 3 mb in total then delete SAMPLE folder and it`s subdirectories and files within it.
It's pretty hard to do with just BAT commands and no helper utility. The real problem with doing it in BAT is that numbers in BAT are limited to a maximum integer of 2147483648. That's 2GB. So if you were to try and process folders that had sizes that exceed that number then weird stuff starts to happen with BAT arithmetic.
If you want to assume that no folders ever exceed that, then using one of those utils in a BAT file could work, if you want help with that let me know.