首页 | 免费域名 | 个人服务器 | 一流信息监控拦截系统 | 虚拟主机知识库 | ASP 空间 | ASP技术大全 | 下载中心 | 客户服务中心
  7i24 > ASP技术大全 > 代码乐园 >
    7i24 .Com  
  列出服务器上的所有硬盘及类型 by ASP精品屋

7i24.Com不停为您服务


 列出服务器的的所有磁盘.
<%
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>"
%>



  2002年1月14日  阅读 1357 次  发送此页给朋友  来源:    版权争议  删除

相关文章:   近期热点:

上一篇: 显示最后十个来访者的源程序
下一篇: 在SQL中判断一个表是否存在
返回上一层...
搜索:

(C)2004-2022 7i24.Com 保留所有权利