Open In App

ASP GetBaseName Method

Last Updated : 23 Feb, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report

The GetBaseName Method in ASP is used for returning the base name of the file or folder from the specified location of the file. It is a predefined method of the FileSystem Object. 

For Example The BaseName of the file having path d::/hello/GFG/sudo.asp is sudo.asp.

Syntax 

FileSystemObject.GetBaseName(path)

Parameter Values 

path: It is a required attribute. It specifies the complete pathname for which the basename would be returned.

Example Code: Below example illustrates the ASP BaseName Method

Javascript




<%
dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetBaseName("d:\Hello\sudo\GeeksForGeeks"))
set fs=nothing
%>


Output 

GeeksForGeeks


Next Article
Article Tags :

Similar Reads