Open In App

ASP ShareName Property

Last Updated : 19 Mar, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

The ASP ShareName Property is used to return the network share name of the specified drive.

Syntax:

DriveObject.ShareName 

Example: The below code demonstrates the ASP Drive.ShareName Property.

ASP
<%
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")

'Getting the required drive
set d=fs.GetDrive("d:")

'Getting the share name of the drive
Response.Write("The share name of drive: " & d.ShareName)

set d=nothing
set fs=nothing
%>

Output 

The share name of drive: GeeksForGeeks

Similar Reads