网络编程
位置:首页>> 网络编程>> Asp编程>> asp如何读取服务器上的驱动器?

asp如何读取服务器上的驱动器?

 来源:asp之家 发布时间:2009-11-18 20:50:00 

标签:服务器,驱动器,fso

 

asp使用fso读取驱动器信息:

<%
vv=drive()
response.write vv 
function drive() 
Dim fs, d, dc, s, n 
Set fs = CreateObject("Scripting.FileSystemObject") 
Set dc = fs.Drives 
For Each d in dc 
If d.IsReady Then 
s = s & d.DriveLetter & " - " 
If d.DriveType = 3 Then n = d.ShareName Else n = d.VolumeName 
s = s & "当前驱动器:" & n 
s = s & "SN: " & d.SerialNumber 
s = s & "可用空间: " & FormatNumber(d.AvailableSpace/1024, 0) 
s = s & "KB" 
End If 
Next 
response.write s 
end function
%>

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com