Latest web development tutorials

ASP FreeSpace property

Drive Object Reference Complete Drive Object Reference

FreeSpace property returns the amount of free space on the specified drive or network share for users.

Note: The returned value is usually equal to the value returned by the AvailableSpace property.Computer systems that support quotas, the value returned by these two properties differ.

grammar

DriveObject.FreeSpace

Examples

<%
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("c:")
Response.Write("Drive " & d)
Response.Write(" Free space in bytes: " & d.FreeSpace)
set d=nothing
set fs=nothing
%>

输出:

Drive c: Free space in bytes: 884465664


Drive Object Reference Complete Drive Object Reference