Open In App

ASP DriveLetter Property

The ASP DriveLetter Property is used to return the upper-case letter that defines the local disk or a network share.

Syntax:



DriveObject.DriveLetter

Example: The below code illustrates the ASP Drive Letter Property. 




<%
dim fs,dr
set fs=Server.CreateObject("Scripting.FileSystemObject")
    
'Getting the drive to be used
set drive=fs.GetDrive("d:")
  
'Getting the drive letter of the drive
Response.Write("Letter of the drive is: " & dr.DriveLetter)
    
set dr=nothing
set fs=nothing
%>

Output:



Letter of the drive is: D
Article Tags :