Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

JScript Drive Object VolumeName Property

Sets or returns the volume name of the specified drive. This property is not available under UNIX. Read/write.

Syntax: JScript Drive Object VolumeName Property

object.VolumeName [= newname]

Arguments: JScript Drive Object VolumeName Property

object

Required. Always the name of a Drive object.

newname

The new name of the specified object. Optional.

Remarks: JScript Drive Object VolumeName Property

The following code illustrates the use of the VolumeName property:

function SpaceReport(drvPath)

{

var fs, d, s;

fs = new ActiveXObject("Scripting.FileSystemObject");

d = fs.GetDrive(fs.GetDriveName(drvPath));

s = "Drive " + drvPath + " - ";

s += d.VolumeName + "<br>";

s += "Total Space: "+ d.TotalSize/1024 + " Kbytes <br>";

s += "Free Space: " + d.FreeSpace/1024 + " Kbytes";

Response.Write(s);

}

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.