用ASP显示目录的大小

2006-04-04 程序代码 1069 阅读 0 评论

<%
Set MyFileSize = Server.CreateObject ("Scripting.FileSystemObject")
MyPath = Server.MapPath("/clang")
Set MyFolder = MyFileSize.GetFolder(MyPath)
%>

<% =MyPath %> is <% =MyFolder.Size %> bytes

显示结果为:
:\Inetpub\wwwroot\clang is 47331 bytes

本文链接:https://blog.clang.cn/301.html

版权声明:转载请注明出处。

评论 (0)

评论已关闭