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
疑難解答 |