| VolumeName 属性 |
|
VolumeName 属性的语法有以下部分:
| 部分 | 描述 |
| object | 必选。应为 Drive 对象的名称。 |
| newname | 可选。如果提供此参数,则 newname 为指定的 object 的新名称。 |
Function ShowVolumeInfo(drvpath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fs.GetDriveName(fso.GetAbsolutePathName(drvpath)))
s = "驱动器 " & d.DriveLetter & ": - " & d.VolumeName
ShowVolumeInfo = s
End Function