Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetBaseName Question

Status
Not open for further replies.

JSDNUK

Programmer
Feb 13, 2006
21
GB
Hey ASP ppl's...

Does anybody know if it's possible to return the BaseName of your current document without having to write it into the function manually?

i.e without having to write

set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetBaseName("200001.asp"))

I've tried removing the 200001.asp, but without any success. Any other ideas??

Many Thanks!!
 
try this:

set fs=Server.CreateObject("Scripting.FileSystemObject")
Response.Write(fs.GetBaseName([red]Request.ServerVariables("PATH_TRANSLATED")[/red]))

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top