Finding the size of an online directory

Darren66

Member
Joined
Jun 9, 2003
Messages
20
I want to find the size of a directory which I know will have no subdirectories. On my local machine the following works fine:
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
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?
 
Ive been using the WinInet APIs to access the Internet and put files in the directory specifically: InternetConnect, InternetOpen, FtpPutFile. This all works fine.
But I couldnt find anything for determining the directory size. It seemed like it should be fairly simple, but its got me!
 
Back
Top