就按昨天说明的做吧,列出服务器的的所有磁盘.
<%
function Tran(drv)
select case drv
case 0:Tran="设备无法识别"
case 1:Tran="软盘驱动器"
case 2:Tran="硬盘驱动器"
case 3:Tran="网络硬盘驱动器"
case 4:Tran="光盘驱动器"
case 5:Tran="RAM虚拟驱动器"
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>驱动器类型
</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>"
%>
ASP精品屋 http://aspage.yeah.net
----------------------------------------
2000-5-29 By 探索者