This is a little function I wrote one day when I needed to get the total size of a set of folders (including sub folders). It performs a recursive search and computes the total count and also shows the size in a more human-readable format. It also have a “hidden” property called SizeInBytes that can be helpful if you want to do size calculations and need the size in a common format.

Enjoy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s