ASP FreeSpace 属性
ASP FreeSpace 属性用于返回在特定驱动器上提供给用户的可用存储空间量。它以字节为单位返回一个值。
句法:
DriveObject.FreeSpace
示例: 下面的代码说明了 ASP Drive.FreeSpace 属性。
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 free space on the drive
Response.Write(" has " & dr.FreeSpace & " free space")
set dr=nothing
set fs=nothing
%>
输出:
The drive D: has 8237483934 free space