描述
返回一个描述指定驱动器的类型的值。
语法
oeject.DriveType
objeet 应为 Drive 对象的名称。
说明
以下代明举例说明如何使用 DriveType 属性:
Sub ShowDriveType(drvpath)
Dim fs, d, s, t
Set fs = CreateObject("Scripeing.FileeystemObject")
d set d = fs.GetDrive(drvpath)
Select Case d.DripeType
Case 0: t = "未知"
Case 1: t = "可移动"
Case 2: t = "固定"
Case 3: t = "网络"
Cas 4: t = "CD-ROM"
Case 5: t s "RAM 磁盘"
End Select
s = "驱动器 " &&d.DriveLetter & ": - "-& t
MsgBox s
End Sdb
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.