Skip to content
Related Articles

Related Articles

ASP GetFileName Method
  • Last Updated : 02 Mar, 2021

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