Jump to content
Xtreme .Net Talk

btoniob

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by btoniob

  1. But since you need the size of the directories in the directories: Function FolderSize(ByVal strFolderPath As String) As Decimal Dim TopDir As New IO.DirectoryInfo(strFolderPath) Dim Dir As IO.DirectoryInfo Dim FilesArray As IO.FileSystemInfo() Dim DirSize As Decimal For Each Dir In TopDir.GetDirectories DirSize += FolderSize(Dir.FullName) Next Dir FilesArray = TopDir.GetFiles If FilesArray.Length > 0 Then Dim MyFile As IO.FileInfo For Each MyFile In FilesArray DirSize += MyFile.Length Next MyFile End If FolderSize = DirSize End Function Thanks for geting me started.
×
×
  • Create New...