Help in extracting filename ..... URGENT

Results 1 to 2 of 2

Thread: Help in extracting filename ..... URGENT

  1. #1
    Join Date
    Dec 1969

    Default Help in extracting filename ..... URGENT

    Hi<BR><BR>I want to extract the filename with its extension from the entire URL path:<BR>From ""<BR>I want only "testpage.asp" string ie filename .<BR>The query should be dynamic so as to retreive only filename.extension from any URL address typed in. (Eg. Instr())<BR><BR>Pl. help ....<BR>Thanks in advance !!!

  2. #2
    Jason Miller Guest

    Default Should work...

    mid(request.serverVariables("SCRIPT_NAME"), inStrRev(request.serverVariable("SCRIPT_NAME"), "/"))<BR><BR>Note that it&#039s not efficient (should have saved the r.sV to a temporary variable instead of pulling it up multiple times) and will return the QueryString stuff (if it exists).<BR><BR>But it should be a good starting point.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts