ASP 可用空间属性
ASP AvailableSpace 属性用于返回驱动器上剩余的可用空间量。它以字节为单位返回值。
句法:
DriveObject.AvailableSpace
示例:下面的代码说明了 ASP Drive.AvailableSpace 属性。
ASP
<%
Dim fs,dr
Set fs=Server.CreateObject("Scripting.FileSystemObject")
'Getting the drive to be checked
Set dr=fs.GetDrive("d:")
Response.Write("The drive: " & dr)
'Getting the available space of the drive
Response.Write(" has available space: " & dr.AvailableSpace)
set dr=nothing
set fs=nothing
%>
输出:
The drive: D: has available space: 992345694