Drives.Item()

JScript3.0+Syntax

new enumeratorobj = Enumerator(Drives)
enumeratorobj.Item()

Description

Because the Drives object is a collection, the Item() property relates to an enumerated Drives collection.

Example

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.

Listing 9.40 Retrieving Drives Using Item()
 <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()) ...

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.