ASP GetFileName() - FileSystemObject This the tutorial/example asp script how to Get file name.
ShotDev Focus:
- ASP & Get file name
Example
asp_filesystemobject_getfilename.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Dim objFSO,strFileName Set objFSO = Server.CreateObject("Scripting.FileSystemObject") strFileName = objFSO.GetFileName(Server.MapPath("MyFiles/shotdev.txt")) Response.write("File name = " &strFileName) Set objFSO = Nothing %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_filesystemobject_getfilename.asp
Screenshot