August 1999
Intermediate to advanced
1488 pages
72h 53m
English
driveobject.IsReady
The IsReady property of the Drive object contains the status of the specified drive. If the drive is ready, true is returned, otherwise false is returned.
Listing 9.31 determines if drive A is ready.
<script language="JScript"> <!-- Hide //Create a string to hold the drive path var drivePath = "A:"; //Create a file system objectvar fileSysObj = new ActiveXObject("Scripting.FileSystemObject"); //Create a Drive object for drive A var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath)); //Determine if drive is ready if(drive.IsReady) document.write("Drive ",drivePath," is ready."); else document.write("Drive ",drivePath," is ... |
Read now
Unlock full access