August 1999
Intermediate to advanced
1488 pages
72h 53m
English
driveobject.AvaliableSpace
The AvaliableSpace property of the Drive object contains the amount of space available to the user on the specified drive or shared network.
Listing 9.26 displays the available space on drive C.
<script language="JScript"> <!-- Hide // Create a string to hold the drive path var drivePath = "C:"; //Create a file system object var fileSysObj = new ActiveXObject("Scripting.FileSystemObject"); //Create a Drive object for drive C var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath)); //Display the available space document.write("Available space for drive ",drivePath," is "); document.write(drive.AvailableSpace); ... |
Read now
Unlock full access