web 2.0

ASP Size() - Folder Object

ASP Type() - Folder Object This the tutorial/example asp script how to Get folder Size.

ShotDev Focus:
- ASP & Get folder Size.

Example

asp_folder_size.asp

  1. <% Option Explicit %>  
  2. <html>  
  3. <head>  
  4. <title>ShotDev.Com Tutorial</title>  
  5. </head>  
  6. <body>  
  7. <%  
  8. Dim objFSO, objFolder  
  9. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")  
  10. Set objFolder = objFSO.GetFolder(Server.MapPath("MyFiles"))  
  11. Response.Write "Attributes : " & objFolder.Attributes &     "<br>"  
  12. Response.Write "Name : " & objFolder.Name & "<br>"  
  13. Response.Write "ShortName : " & objFolder.ShortName &     "<br>"  
  14. Response.Write "Size : " & objFolder.Size & " bytes     <br>"  
  15. Response.Write "Type : " & objFolder.Type & "<br>"  
  16. Response.Write "Drive : " & objFolder.Drive &     "<br>"  
  17. Response.Write "IsRootFolder : " & objFolder.IsRootFolder     & "<br>"  
  18. Response.Write "Path : " & objFolder.Path & "<br>"  
  19. Response.Write "ParentFolder : " & objFolder.ParentFolder     & "<br>"  
  20. Response.Write "ShortPath : " & objFolder.ShortPath &     "<br>"  
  21. Response.Write "DateCreated : " & objFolder.DateCreated     & "<br>"  
  22. Response.Write "DateLastAccessed : " &     objFolder.DateLastAccessed & "<br>"  
  23. Response.Write "DateLastModified : " &     objFolder.DateLastModified & "<br><br>"  
  24. Set objFSO = Nothing  
  25. Set objFolder = Nothing  
  26. %>  
  27. </body>  
  28. </html>  

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_folder_size.asp

Screenshot

ASP & Get folder Size.
.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.