Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get size of Folders recursivly

Status
Not open for further replies.

wasserfa89

Technical User
Apr 15, 2012
24
CH
Hi all

I use Visual Basic 2010 Express and the Code below
-------------------------------------------------------
Module Module1
Dim fln, result ' Declare Variables
Dim fname As String
' Freespace
' Shows Space Usage of every Folder on the fileserver


Sub Main()
fname = "c:\temp\test.txt"
fln = FileLen(Trim(fname))
result = CInt((fln / 1024) / 1024) & " MB" & "(" & fln & "BYTES)"
MsgBox("Grösse des Files --> " & result)
End Sub

End Module
--------------------------------------------------------
so far so good, Script works fine, but now i need the following:

How can read out recursivly a path for example

Drive D:
and list file Size of every folder recursivly

The idea behind is a little statistic tool which shows the consumption of the disk space on the fileserver

Thanks for your helfp

 
>I use Visual Basic 2010 Express

So you should post your question in forum796
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top