Visual Basic Scripting Edition | 語言參考 |
VolumeName 屬性設(shè)置或返回指定驅(qū)動器的卷標(biāo)?勺x寫。 object.VolumeName [=newname]
參數(shù)object 必選項。應(yīng)為 Drive 對象的名稱。 newname 可選項。如果提供此參數(shù),則 newname 為指定的 object 的新名稱。 說明以下代碼舉例說明如何使用 VolumeName 屬性: Function ShowVolumeInfo(drvpath)
Dim fso, d, s
Set fso =CreateObject("Scripting.FileSystemObject")
Set d =fso.GetDrive(fs.GetDriveName(fso.GetAbsolutePathName(drvpath)))
s =" 驅(qū)動器 " & d.DriveLetter & ": - " & d.VolumeName
ShowVolumeInfo =s End Function
請參閱AvailableSpace 屬性 | DriveLetter 屬性 | DriveType 屬性 | FileSystem 屬性 | FreeSpace 屬性 | IsReady 屬性 | Path 屬性 | RootFolder 屬性 | SerialNumber 屬性 | ShareName 屬性 | TotalSize 屬性 應(yīng)用于:Drive 對象 返回首頁 |