ASP DriveLetterProperty


Drive 对象参考手册Complete Drive Object Reference Manual

The DriveLetter property returns the uppercase letter (drive letter) that identifies a local drive or network share.

Note:If the specified drive is not associated with a drive letter (for example, a network share that has not been mapped to a drive letter), the DriveLetter property returns a zero-length string ("").

Syntax

DriveObject.DriveLetter

Example

<%
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
%>

Output:

The drive letter is: C


Drive 对象参考手册Complete Drive Object Reference Manual Other Extensions