- ASP - Server Variables
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·What's New?
Mail List


Disk Space Usage
One of the most important things that webmasters need to track is their disk space utilization. The amount of space that your site is taking up on the server is often times the only real difference in the price of many web-hosting packages. If your site exceeds your hosting package plan space allocation there is usually a disproportionate price paid for the additional disk space as opposed the per megabyte price paid for the hosting package. All hosting companies should provide a simple way to access how much space your site is utilizing (The host of does others do not. This script can be placed in virtually any asp directory and will read the size of all subordinate directories. If placed in the top level of a virtual you may need to make revisions to the server.mappath statement.
View the Output
Text View
Print View
Mail this Link
Download the Code

'Capture the name of the page as well as directory structure 

'Split the directory tree into an arry by /

' Sets the number of directory levels down


<title> Size)</title>
<body bgcolor="#FFFFFF">

<table align="center">
<td width=150>
<td width=150>
<td width=150>
<td width=150>
' Create a file system object to read all the directories
' beneath the current directory split_name(num_directory)
' You can hard code the directory name if you like
set directory=server.createobject("scripting.filesystemobject")
set allfiles=directory.getfolder(server.mappath("../"& split_name(num_directory)& "/"))

' Lists all the files found in the directory
for each directory in allFiles.subfolders
' Removes certain MSFrontPage was directories 
if right(directory.Name,3) <> "cnf" then 
'Adds the folder sizes up for a total
total_size=total_size + directory.size %>

<td width=150>
<%= %>
<td width=150><%= formatnumber((directory.size/1024/1024),2) %></td>
<td width=150><%= formatnumber((directory.size/1024),0) %></td> 
<td width=150><%= formatnumber(directory.size,0) %></td> 
<% end if 'end check for FrontPage directories 
next 'end of the for next loop %>

<td width=150><b>Total</b></td>
<td width=150><%= formatnumber((total_size/1024/1024),2) %></td>
<td width=150><%= formatnumber((total_size/1024),0) %></td> 
<td width=150><%= formatnumber(total_size,0) %></td> 





ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3