Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I want to find the size of a directory which I know will have no subdirectories. On my local machine the following works fine:

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 can't seem to get it to work....

Any suggestions?

Posted

I've been using the WinInet API's to access the Internet and put files in the directory specifically: InternetConnect, InternetOpen, FtpPutFile. This all works fine.

But I couldn't find anything for determining the directory size. It seemed like it should be fairly simple, but it's got me!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...