Skip to content
Related Articles

Related Articles

ASP GetBaseName Method
  • Last Updated : 23 Feb, 2021

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
My Personal Notes arrow_drop_up
Recommended Articles
Page :