|
Display a folders size
This shows
how to display the size of a directory on your hard disk , this
example uses a fictitous folder , change to one of your own
folders.
<%
Dim objFSO , objFolder
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("d:\asp")
Response.Write "The folder is " & objFolder.Size
& "bytes"
%>
If you wanted to display the size of a directory on your server
you could use this.
<%
Dim objFSO , objFolder , PathToFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
PathToFile = Server.MapPath("/yourdirectory")
Set objFolder = objFSO.GetFolder(PathToFile)
Response.Write "The folder is " & objFolder.Size
& "bytes"
%>
|