I'm converting an old app that records folder sizes on a daily basis. The legacy app uses the Scripting.FileSystemObject library:
Set fso = CreateObject("Scripting.FileSystemObject")
Set folderObject = fso.GetFolder(folder)
size = folderObject.Size
There isn't an equivalent mechanism on the System.IO.Directory and System.IO.DirectoryInfo classes.
To achieve the same result in .NET do I actually have to recursively walk the whole folder structure keeping a running total of file sizes?
Update: @Jonathon/Ed - thanks....as I thought. I think I'll just reference the Scripting.FileSystemObject COM library. Works just as well even if breaking the .NET purity of my app. It's for an internal reporting app so it's not such a big deal.
Thanks
Kev