Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.
Microsoft® JScript®
TotalSize Property
 Scripting Run-Time Reference 
Version 3 

See Also                  Applies To


Description
Returns the total space, in bytes, of a drive or network share.
Syntax
object.TotalSize

The object is always a Drive object.

Remarks
The following code illustrates the use of the TotalSize property:
function SpaceReport(drvPath)
{
  var fso, d, s;
  fso = new ActiveXObject("Scripting.FileSystemObject");
  d = fso.GetDrive(fso.GetDriveName(drvPath));
  s = "Drive " + drvPath + " - ";
  s += d.VolumeName + "<br>";
  s += "Total Space: "+ d.TotalSize/1024 + " Kbytes <br>";
  s += "Free Space:  " + d.FreeSpace/1024 + " Kbytes";
  return(s);
}

Home | Javascript validator | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

R7