Visual Basic Scripting Edition | 語言參考 |
Drives 集合只讀所有可用驅(qū)動器的集合。 說明無論是否插入媒體,可移動媒體驅(qū)動器都顯示在 Drives 集合中。 以下代碼舉例說明如何獲得 Drives 集合并使用 For Each...Next 語句枚舉集合成員: ShowDriveList 函數(shù)
Dim fso, d, dc, s, n Set fso =CreateObject("Scripting.FileSystemObject") Set dc =fso.Drives For Each d in dc n ="" s =s & d.DriveLetter & " - " If d.DriveType =Remote Then n =d.ShareName ElseIf d.IsReady Then n =d.VolumeName End If s =s & n &"<BR>" Next ShowDriveList =s End Function
屬性Count 屬性 | Item 屬性 方法Drives 集合無任何方法。 請參閱Drive 對象 | Drives 屬性 | File 對象 | Files 集合 | Folder 對象 | Folders 集合 返回首頁
|