Forum Moderators: mack

Message Too Old, No Replies

Anyone know how to obtain, capture the name of file in URL?

working in cold fusion, want to dynamically grab file name and pass it on..

         

CaptnGordo

5:31 pm on Sep 20, 2004 (gmt 0)

10+ Year Member



Greetings,

I'm working with Cold Fusion and want to dynamically grab the the filename...

something.com/otherpath/filename.cfm

I need the "filename.cfm" and to be able to grab that as a variable and post it to another page.

Any ideas?

Thanks in advance

Sanenet

5:35 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi CaptnGordo, and welcome to webmasterworld!

Use the variable CGI.SCRIPT_NAME.

CaptnGordo

5:39 pm on Sep 20, 2004 (gmt 0)

10+ Year Member



Thanks Sanenet,

I'll give that a try.

Gordo

Sanenet

5:42 pm on Sep 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The CGI array has lots of good stuff in it - try switching on the debugging option (on your dev server!) in order to see all the variables.