Just a quick search...
Is it this what you are looking for?
Enumerating Disk Space on a Computer