ASP DriveLetter Property

Definition and Usage

The DriveLetter property returns an uppercase letter (drive letter) that indicates a local drive or a 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 an empty string ("").

Syntax:

DriveObject.DriveLetter

instance

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

Output:

The drive letter is: D