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>