FileSystemObject.Drives : FileSystemObject : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » FileSystemObject »

 

FileSystemObject.Drives










Syntax








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.












<html>
    <body>
    <script language="JScript">
    <!--
    function getdrive()
    {
        var myObject, drive, e;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        drive = myObject.Drives;
        e = new Enumerator(drive);
        alert("The first drive is: " + e.item());
    }
    -->
    </script>
    <form name="myForm">
    <input type="Button" value="Get Drive Name" onClick='getdrive()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» FileSystemObject