取得指定驱动器的可用空间数

代码:

<!DOCTYPE html>

<html>

<body>

 

<%

Dim fs, d, n

Set fs=Server.CreateObject("Scripting.FileSystemObject")

Set d=fs.GetDrive("c:")

n = "Drive: " & d

n = n & "<br>Available Space in bytes: " & d.AvailableSpace

Response.Write(n)

set d=nothing

set fs=nothing

%>

 

</body>

</html>

结果:

Drive: C:
Available Space in bytes: 466982301696

相关文章