Visual Basic Scripting Edition | Language Reference |
Sets or returns the volume name of the specified drive. Read/write.
object.VolumeName [= newname]
object
Required. Always the name of a Drive object.
newname
Optional. If provided, newname is the new name of the specified object.
The following code illustrates the use of the VolumeName property:
Function ShowVolumeInfo(drvpath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(fso.GetAbsolutePathName(drvpath)))
s = "Drive " & d.DriveLetter & ": - " & d.VolumeName
ShowVolumeInfo = s
End Function
AvailableSpace Property | DriveLetter Property | DriveType Property | FileSystem Property | FreeSpace Property | IsReady Property | Path Property | RootFolder Property | SerialNumber Property | ShareName Property | TotalSize Property
Applies To: Drive Object