Get File name

L

Lin Ma

Hi,

Is there are an easy way to get the file name from the URL address.

My web url is like: http://servername/foldername/filename.asp

I want to get only filename.asp

Do I need to do request.servervariables("PATH_INFO") then trim it and left
only filename.asp?

Or there is a easy way?

Thanks,

Lin Ma
 
R

Ray at

aPath = Split("/" & REquest.ServerVariables("PATH_INFO"), "/")
sFilename = aPath(UBound(aPath))

Ray at work
 
E

Evertjan.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,076
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top