ASP GetBaseName Method
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\w3wiki" )) set fs=nothing %> |
Output
w3wiki
Contact Us