Javascript IsReady property of Drive object returned by the FileSystemObject’s GetDrive method returns the Boolean value i.e. true or false based on the ready state of specified drive. Basically IsReady property works for removable drives such as CD-Rom drive or Floppy drive that changes their status according to disc inside them. When a user inserts a CD into the CD drive then its status changes from loading to reading and then ready to use. IsReady property of Drive object returns true when specified drive enters the ready state. 

Example of JavaScript Drive Object IsReady Property

<script type="text/javascript">
    // initialize ActiveXObject and create an object of Scripting.FileSystemObject.
    var fso = new ActiveXObject("Scripting.FileSystemObject");

    // Drive object reference set to driveObj variable
    var driveObj = fso.GetDrive("E");

    if (driveObj.IsReady) {
        document.write("Drive <b>" + driveObj.DriveLetter + "</b> is ready to use.");
    }
    else {
        document.write("Drive <b>" + driveObj.DriveLetter + "</b> is not ready to use.");
    }

    // Output: 
    // Drive E is not ready to use.
</script>

Continue to next tutorial: Javascript FSO Drive Object Path property to learn how to get the path related to the specified drive.

Recent JavaScript Tutorials

Javascript FSO ShortPath property

Javascript FileSystemObject (FSO) provides a ShortPath property that can be accessed using the folder object or file object returned by the GetFolder or GetFile method.

Javascript FSO Path Property

Javascript FileSystemObject (FSO) provides the Path property that can be accessed through the file object or folder object returned by the GetFile or GelFolder method

Javascript FSO Type property

Javascript FileSystemObject (FSO) provides a Type property that can be accessed through file object or folder object returned by the GetFile or GetFolder method

Javascript FSO ShortName property

Javascript FileSystemObject (FSO) provides a ShortName property that can be accessed using the folder object or file object returned by the GetFolder or GetFile method.

Javascript FSO Name Property

Javascript FileSystemObject (FSO) provides a Name property that can be accessed using file object or folder object.