DriveLetter
ASP DriveLetter 属性
DriveLetter 属性返回标识本地驱动器或网络共享的大写字母(驱动器号)。
注意:如果指定的驱动器没有与驱动器号相关联(例如,一个网络共享未映射驱动器号),则 DriveLetter 属性返回零长度字符串 ("")。
语法
DriveObject.DriveLetter
实例
<%
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("c:")
Response.Write("The drive letter is: " & d.driveletter)
set d=nothing
set fs=nothing
%>
输出:
The drive letter is: C
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("c:")
Response.Write("The drive letter is: " & d.driveletter)
set d=nothing
set fs=nothing
%>
输出:
The drive letter is: C