如何用asp统计一个文件夹 所有文件大小
请高手看看
------解决方案--------------------
- VBScript code
Function totalsize(size) If size<1024 Then totalsize=size&" Bytes" Elseif size<1048576 Then totalsize=Round((size/1024),2)&" KB" Else totalsize=Round((size/1024/1024),2)&" MB" End If End Function set fs = CreateObject("Scripting.FileSystemObject") Set folder = fs.GetFolder(path) Response.Write(totalsize(folder.Size) & " "& vbCrLf)