ASP
Here you can find some FREE usefull Classic ASP / VBScript code snippets, class modules, etc.
Function FileNameIn(String)String
Return the file name portion from a given file path.
Example
<% response.write FileNameIn("C:\inetpub\www\myfolder\myfile.zip") ' will output "myfile.zip" %> Source Code <%
Function FileNameIn(byval filepath) dim p filepath = replace(filepath,"/","\") p = instrrev(filepath,"\") FileNameIn=mid(filepath,p+1) End Function %> |