VolumeName 屬性設(shè)置或返回指定驅(qū)動(dòng)器的卷標(biāo)。可讀寫。 object.VolumeName [=newname]
參數(shù)object 必選項(xiàng)。應(yīng)為 Drive 對(duì)象的名稱。 newname 可選項(xiàng)。如果提供此參數(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òng)器 " & d.DriveLetter & ": - " & d.VolumeName
ShowVolumeInfo =s End Function
請(qǐng)參閱AvailableSpace 屬性 | DriveLetter 屬性 | DriveType 屬性 | FileSystem 屬性 | FreeSpace 屬性 | IsReady 屬性 | Path 屬性 | RootFolder 屬性 | SerialNumber 屬性 | ShareName 屬性 | TotalSize 屬性 應(yīng)用于:Drive 對(duì)象 返回首頁(yè) |