Drive.VolumeName : Drive « MS JScript « JavaScript Tutorial






Syntax

driveobject.VolumeName
    driveobject.VolumeName = newVolumeName

The VolumeName property contains the volume name of the specified drive. If an equal sign follows this property, the volume name is set to newVolumeName.

<html>
    <script language="JScript">
    <!--
      var drivePath = "C:";
      var fileSysObj = new ActiveXObject("Scripting.FileSystemObject");

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

      document.write(drive.VolumeName);
    -->
</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