ASP GetFileName Method
The GetFileName Method in ASP is used for returning the string value that represents the name of the ASP File. Or folder for the last component in a specified path.
Syntax:
FileSystemObject.GetFileName(path)
Parameter Values:
path: It is a required attribute. It specifies the absolute or a relative path to a specific file.
Example Code: Below example illustrates the ASP GetFileName Method.
Javascript
<% dim fs,p set fs=Server.CreateObject( "Scripting.FileSystemObject" ) p=fs.getfilename( "d:\sudo\GFG.html" ) response.write(p) set fs=nothing %> |
Output:
GFG
Contact Us