当前位置: 移动技术网 > IT编程>脚本编程>VBScript > VBS教程:属性-DriveType 属性

VBS教程:属性-DriveType 属性

2017年12月12日  | 移动技术网IT编程  | 我要评论

伯莱势特,工作报告模板,苏州汽车南站电话

drivetype 属性

返回一个描述指定驱动器的类型的值。

object.drivetype

object 应为 drive 对象的名称。

说明

以下代码举例说明如何使用 drivetype 属性:

function showdrivetype(drvpath)    dim fso, d, t    set fso = createobject("scripting.filesystemobject")    set d = fso.getdrive(drvpath)    select case d.drivetype        case 0: t = "未知"        case 1: t = "可移动"        case 2: t = "固定"        case 3: t = "网络"        case 4: t = "cd-rom"        case 5: t = "ram 磁盘"    end select    showdrivetype = "驱动器 " & d.driveletter & ": - " & tend function

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网