Set fso=Server.CreateObject("Scripting.FileSystemObject") |
<%Set fso=Server.CreateObject("Scripting.FileSystemObject")%> <%=fso.GetDriveName("d:")%><br> <%=fso.GetDrive("d:")%> |
<% Set fso=Server.CreateObject("Scripting.FileSystemObject") Set drv=fso.GetDrive(fso.GetDriveName("d:")) %> 该盘的空间大小:<%=drv.TotalSize%><br> 该盘的剩余空间大小:<%=drv.FreeSpace%> |
<% Function ShowDriveInfo(drvPath) Dim fso, drv, s Set fso = CreateObject("Scripting.FileSystemObject") Set drv = fso.GetDrive(fso.GetDriveName(drvPath)) s = "驱动盘" & drv & "的卷标是:" s = s & drv.VolumeName & "<br>" s = s & "总计空间:" & drv.TotalSize & "<br>" s = s & "剩余空间:" & drv.FreeSpace & "<br>" s = s & "文件类型:" & drv.DriveType & "<br>" s = s & "文件系统:" & drv.FileSystem Response.Write s End Function %> <% on error resume next whatpath=request.form("path") if whatpath<>"" then ShowDriveInfo(whatpath) end if%> <form action="drvinfo.asp" method="post"> <input name="path"> <input type="submit"> </form> 学习交流
热门图片
猜你喜欢的新闻
新闻热点 2024-04-27 13:35:46
2024-04-27 13:33:47
2024-04-24 22:53:44
2024-04-23 19:32:50
2024-04-23 19:25:50
2024-04-23 19:13:19
疑难解答 |