Drive.RootFolder : Drive « MS JScript « JavaScript Tutorial






The RootFolder property contains a Folder object that represents the root folder of the specified drive.

<html>
    <script language="JScript">
    <!--
    function getCRootFolder() {
      var drivePath = "C:";

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

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

      return(drive.RootFolder);
    }
    -->
    </script>
</html>








32.5.Drive
32.5.1.Drive
32.5.2.Drive.AvaliableSpace
32.5.3.Drive.DriveLetter
32.5.4.Drive.DriveType
32.5.5.Drive.FileSystem
32.5.6.Drive.FreeSpace
32.5.7.Drive.IsReady
32.5.8.Drive.Path
32.5.9.Drive.RootFolder
32.5.10.Drive.SerialNumber
32.5.11.Drive.ShareName
32.5.12.Drive.TotalSize
32.5.13.Drive.VolumeName