<%
Set MyFileSize = Server.CreateObject ("Scripting.FileSystemObject")
MyPath = Server.MapPath("/somedirectory")
Set MyFolder = MyFileSize.GetFolder(MyPath)
%>
<p><% =MyPath %> is <% =MyFolder.Size %> bytes</p>
我們可以看到顯示的樣式如:Shenzhaoyang\Chunfeng\somedirectory is 66093625 bytes。
[1]