The System.IO.DirectoryInfo class does not come with a method to copy a directory. In this article, we’ll see how to create a method to do that, and then use it in an ASP.NET page.
In classic ASP it’s very easy to get the size of a folder since the FileSystemObject (FSO) class includes a Size function. In ASP.NET there is no such function provided, so we’ll see how to create one, extending the System.IO.DirectoryInfo Namespace.