ASP DriveType 属性

定义和用法

DriveType 属性返回一个指示驱动器类型的值。

此属性可返回下列值之一:

  • 0 = unknown
  • 1 = removable
  • 2 = fixed
  • 3 = network
  • 4 = CD-ROM
  • 5 = RAM disk

语法:

DriveObject.DriveType

实例

<%
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("a:")
Response.Write("The drive type is: " & d.DriveType)
set d=nothing
set fs=nothing
%>

输出:

The drive type is: 1
目录