这个显示盘符信息的ASP代码如何修改

来源:百度知道 编辑:UC知道 时间:2024/05/14 04:09:34
代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
set fs=server.CreateObject("scripting.FileSystemObject")
set drives=fs.Drive
response.Write("驱动器数目:" & drive.count & "<br>")
%>
<table width="950" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="67" align="center">指定字母</td>
<td width="59" align="center">类型</td>
<td width="70" align="center">根目录</td>
<td width="56" align="center">准备好</td>
<td width="105" align="center">全部空间</td>
<td width="102" align="center">已用空间</td>
<td width="96" align="center">剩余空间</td>
<td width="98" align="center"&

<% For Each d in fs.drives %>

<tr>
<td><%=d.DriveLetter%></td>
<td><%=d.DriveType%></td>
<td><%=d.Path%></td>
<td><%=d.IsReady%></td>
<% if d.IsReady then %>
<td><%=formatnumber(d.TotalSize/1024/1024/1024,2,true) & "GB"%></td>
<td><%=formatnumber(d.Availablespace/1024/1024/1024,2,true) & "GB"%></td>
<td><%=formatnumber(d.Freespace/1024/1024/1024,2,true) & "GB"%></td>
<td><%=d.FileSystem%></td>
<td><%=d.VolumeName%></td>
<td><%=d.ShareName %></td>
<%end if%>
<%next%>

<% if d.IsReady then %>
<td><%=formatnumber(d.TotalSize/1024/1024/1024,2,true) & "GB"%></td>
<td><%=formatnumber(d.Availablespace/1024/1