Drive.TotalSize : Drive « MS JScript « JavaScript Tutorial






The TotalSize property returns the total size of the specified drive in bytes.

<html>
    <script language="JScript">
    <!--
    var drivePath = "C:";

    var fileSysObj = new ActiveXObject("Scripting.FileSystemObject");

    var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath));

    document.write("Drive ",drivePath," is ",drive.TotalSize," bytes.");
    -->

    </script>
</html>








32.5.Drive
32.5.1.Drive
32.5.2.Drive.AvaliableSpace
32.5.3.Drive.DriveLetter
32.5.4.Drive.DriveType
32.5.5.Drive.FileSystem
32.5.6.Drive.FreeSpace
32.5.7.Drive.IsReady
32.5.8.Drive.Path
32.5.9.Drive.RootFolder
32.5.10.Drive.SerialNumber
32.5.11.Drive.ShareName
32.5.12.Drive.TotalSize
32.5.13.Drive.VolumeName