Rats, you may have to use recursion to the ends of the tree to get the size of all files in a directory. I do this in REXX and make a CSV with these columns: directory #files in this directory #bytes in those files #files in this plus all subdirectories #bytes in those files It's an interesting way to explore disk usage. There are a number of fascinating ways to graph this kinda thing. There is much fun to be had if you want to follow it up.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com