Drive.DriveType : Drive : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » Drive »

 

Drive.DriveType









The DriveType property contains a numeric value indicating type of the specified drive.

Drive Type Value Definitions































Value Description
0 Unknown
1 Removable
2 Fixed
3 Network
4 CD-ROM
5 RAM Disk















<html>
    <script language="JScript">
    <!--
    var drivePath = "C:";

    var fileSysObj = new ActiveXObject("Scripting.FileSystemObject");

    var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath));

    document.write("The drive type for ",drivePath," is ",drive.DriveType);

    -->
    </script>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» Drive