August 1999
Intermediate to advanced
1488 pages
72h 53m
English
driveobject.VolumeName driveobject.VolumeName = newVolumeName
The VolumeName property of the Drive object contains the volume name of the specified drive. If an equal sign follows this property, the volume name is set to newVolumeName.
Listing 9.37 provides a function that returns the volume name of a drive.
function getVolumeName(drivePath)
{
//Create a file system object
var fileSysObj = new ActiveXObject("Scripting.FileSystemObject");
//Create a Drive object for the drivePath
var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath));
//Return volume name of the drive
return(drive.VolumeName);
}
|
Read now
Unlock full access