FileSystemObject.GetDriveName() : FileSystemObject : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » FileSystemObject »

 

FileSystemObject.GetDriveName()










Syntax








filesystemobject.GetDriveName(letter)



The GetDriveName() method gets the name of a specified drive.

This method takes drive as its only parameter












<html>
    <body>
    <script language="JScript">
    <!--
    function getdrive()
    {
        var myObject, drive;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        drive = myObject.GetDriveName("c:\");
        alert("Name for drive C is: " + drive);
    }
    -->
    </script>
    Get the name for Drive C.
    <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