Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP DriveLetter Property

ASP DriveLetter Property


Drive Object Reference Complete Drive Object Reference Manual


The DriveLetter property returns the uppercase 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 is not 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 Object Reference Complete Drive Object Reference Manual