I want to find the size of a directory which I know will have no subdirectories. On my local machine the following works fine:
However what I really need is to find the size of a directory that resides on the internet and I cant seem to get it to work....
Any suggestions?
Code:
Imports System.IO
Public Function DirSize() As Integer
Dim d As New DirectoryInfo("c:\Darren")
Dim Size As Long = 0
Dim fis As FileInfo() = d.GetFiles()
Dim fi As FileInfo
For Each fi In fis
Size += fi.Length
Next fi
Return Size
End Function
Any suggestions?