显示程序代码:
<%
Set MyFileSize = Server.CreateObject ("Scripting.FileSystemObject")
MyPath = Server.MapPath("/Web")
Set MyFolder = MyFileSize.GetFolder(MyPath)
%>
<p><% =MyPath %> is <% =MyFolder.Size %> bytes</p>
显示结果为:
:\Inetpub\wwwroot\Web is 47331 bytes
用ASP显示目录的大小字节
80酷酷网 80kuku.com