MyPath = Server.MapPath("/Web")
Set MyFolder = MyFileSize.GetFolder(MyPath) <br>">

用ASP显示目录的大小字节

80酷酷网    80kuku.com

  显示程序代码:
<%
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











分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: