8.7.12 VolumeName Property

Sets or returns the volume name of the specified drive. This property is not currently supported on UNIX. Read/write.
Syntax
object.VolumeName [= newname]
Arguments
- object
- The name of a Drive object. Required.
- newname
- If provided, newname is the new name of the specified object. Optional.
Remarks
The following code illustrates the use of the VolumeName property:
Sub ShowVolumeInfo(drvpath)
Dim fs, d, s
Set fs = CreateObject("Scripting.FileSystemObject")
Set d = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutePathName(drvpath)))
s = "Drive " & d.DriveLetter & ": - " & d.VolumeName
Response.Write s
End Sub
Copyright © 2000 Chili!Soft
|