Previous PageNext Page

7.13.11 TotalSize Property

Returns the total space, in bytes, of a drive or network share. This property is not available under UNIX.
 

Syntax

object.TotalSize

object
A Drive object.

Remarks

The following code illustrates the use of the TotalSize property:
 

function SpaceReport(drvPath)

{

var fs, d, s;

fs = new ActiveXObject("Scripting.FileSystemObject");

d = fs.GetDrive(fs.GetDriveName(drvPath));

s = "Drive " + drvPath + " - ";

s += d.VolumeName + "<br>";

s += "Total Space: "+ d.TotalSize/1024 + " Kbytes <br>";

s += "Free Space: " + d.FreeSpace/1024 + " Kbytes";

Response.Write(s);

}


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page