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