August 1999
Intermediate to advanced
1488 pages
72h 53m
English
driveobject.FreeSpace
The FreeSpace property of the Drive object contains the amount of free space available to the user on the specified drive or shared network.
Listing 9.30 retrieves the free space associated with the specified drive.
<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 free space on the drive document.write("Drive ",drivePath," has ",drive.FreeSpace," free space."); //Hide ... |
Read now
Unlock full access