August 1999
Intermediate to advanced
1488 pages
72h 53m
English
filesystemobject.Drives
The Drives collection is a collection that holds all the Drive objects. It is used to get an object consisting of all the drives.
Listing 9.78 shows how to check for drives.
<html> <body> <script language="JScript"> <!-- Hide function getdrive() { var myObject, drive, e; // Create an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); drive = myObject.Drives; // Store drives in a enumerator e e = new Enumerator(drive); alert("The first drive is: " + e.item()); } // End Hide --> </script> <form name="myForm"> <input type="Button" value="Get Drive Name" onClick='getdrive()'> </form> ... |
Read now
Unlock full access