Open In App

ASP DriveLetter Property

Improve
Improve
Like Article
Like
Save
Share
Report

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. 

ASP




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

Last Updated : 22 Mar, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads