July 2000
Intermediate to advanced
492 pages
14h 53m
English
AvailableSpace (Drive Object) —
drvObj
.
AvailableSpace
The number of bytes of space left on the current drive. It is inaccurate for drives with over 2GB of available space. This is a read-only property.
None
<%
' Dimension local variables.
Dim fsoObject ' FileSystemObject
Dim drvObject ' Drive Object
Dim lngAvailBytes ' Number of bytes available
' Instantiate the FileSystemObject variable.
Set fsoObject = Server.CreateObject( _
"Scripting.FileSystemObject")
' Using the GetDrive method of fsoObject, initialize a
' Drive object.
Set drvObject = fsoObject.GetDrive("\\PublicDocs")
' Retrieve the amount of space (in bytes) available
' on the drive.
lngAvailBytes = drvObject.AvailableSpace
. . . [additional code]
%>The only time the value for the AvailableSpace property and the value for the FreeSpace property will be different is if the drive supports quotas. For all practical purposes, you can use these two properties interchangeably.
Read now
Unlock full access