Drives.Item() : Drives « MS JScript « JavaScript Tutorial






Syntax

new enumeratorobj = Enumerator(Drives)

    enumeratorobj.Item()

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

<html>
    <H1>Drive Letters and drive types:</H1>
    <script language="JScript">
    <!--
    var fileSysObj = new ActiveXObject("Scripting.FileSystemObject");

    var en = new Enumerator(fileSysObj.Drives);

    for (;!en.atEnd();en.moveNext()) {
      document.write("Drive ",en.item().DriveLetter);
      document.write(" is of type ",en.item().DriveType,"<br>");
    }
    -->
    </script>
    </html>








32.6.Drives
32.6.1.Drives
32.6.2.Drives.Count
32.6.3.Drives.Item()