用ASP列出服務(wù)器上的所有硬盤及分類
發(fā)表時間:2024-02-10 來源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]列出服務(wù)器的的所有磁盤. <% function Tran(drv) select case drv case 0:Tran="設(shè)備無法識別" case 1:Tran="軟盤驅(qū)動器" case 2:Tran="硬盤驅(qū)動器" case...
列出服務(wù)器的的所有磁盤.
<%
function Tran(drv)
select case drv
case 0:Tran="設(shè)備無法識別"
case 1:Tran="軟盤驅(qū)動器"
case 2:Tran="硬盤驅(qū)動器"
case 3:Tran="網(wǎng)絡(luò)硬盤驅(qū)動器"
case 4:Tran="光盤驅(qū)動器"
case 5:Tran="RAM虛擬驅(qū)動器"
end select
end function
Set fs=Server.CreateObject("Scripting.FileSystemObject")
response.write "<table width='100%' cellpadding='5' cellspacing='2'><tr><td><b>盤符</td><td><b>驅(qū)動器類型
</td></tr>"
for each d in fs.drives
response.write "<tr><td><a href=files.asp?sPath=" & d.DriveLetter & ":\><font size=4><b>" &
d.DriveLetter & "</a></td><td><font size=4><b>" & Tran(d.DriveType) & "</tr>"
next
set fs=nothing
response.write "</table>"
%>
(出處:熱點網(wǎng)絡(luò))