August 1999
Intermediate to advanced
1488 pages
72h 53m
English
new enumeratorobj = Enumerator(Drives) enumeratorobj.Item()
Because the Drives object is a collection, the Item() property relates to an enumerated Drives collection.
Listing 9.40 begins by creating an Enumerator object to access the Drives collection. The Item() property is used by the enumerator object to access the letter and type of each drive.
<html> <H1>Drive Letters and drive types:</H1> <script language="JScript"> <!-- Hide //Create enumerator object var fileSysObj = new ActiveXObject("Scripting.FileSystemObject"); var en = new Enumerator(fileSysObj.Drives); //Display drive letter and type for each drive. for (;!en.atEnd();en.moveNext()) ... |
Read now
Unlock full access