' Get The Sizes of Folder and Subfolders recursively
folder="c:\temp"
Set fso = CreateObject("Scripting.Filesystemobject")
result=""
Browse fso.GetFolder(folder),""
arr = Split(result,vbCrLf)
For i=UBound(arr) to 0 Step -1
WScript.Echo arr(i)
Next
Function Browse(myfolder,indent)
Dim size
size=0
For Each file In myfolder.Files
size=size+file.Size
Next
For Each subfolder In myfolder.SubFolders
size=size + Browse(subfolder,indent & " ")
Next
result = result & indent & myfolder.Name & " [" & size & "]" & vbCrLf
Browse=size
End Function