Drive.IsReady

JScript3.0+Syntax

							driveobject.IsReady

Description

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.

Example

Listing 9.31 determines if drive A is ready.

Listing 9.31 Is Drive A 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 ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.