TotalSize property
Returns the total number of bytes for the drive or network share.
object.TotalSize
objectShould beDriveThe name of the object.
illustrate
The following code shows how to use itTotalSizeproperty:
Function ShowSpaceInfo(drvpath) Dim fso, d, s Set fso = CreateObject("") Set d = (((drvpath))) s = "
Drive" & & ":"
s = s & vbCrLf
s = s & "
Total capacity:" & FormatNumber(/1024, 0) & "KB"
s = s & vbCrLf
s = s & "
Available space:" & FormatNumber(/1024, 0) & "KB"
ShowSpaceInfo=s
End Function