Skip to content
Related Articles

Related Articles

ASP DriveLetter Property

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 22 Mar, 2021

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!