View Single Post
  #1 (permalink)  
Old Aug 16th, 2007, 10:01
daithi daithi is offline
New Member
Join Date: Aug 2007
Location: Ireland
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Post Substring Problem

Hi
I pretty new to this, but I need help badly. I'm using a browse button on a html page which selects a file. The file is not for upload I just require the path. What I want to be able to do is crop the file path from the last backslash and replace it with text of my choice.
eg
file path - D:\tomcat\webapps\mailer2\home.jpg
do to - D:\tomcat\webapps\mailer2\
result - D:\tomcat\webapps\mailer2\logo.jpg

I think it might be done with the substring function but I really dont know. I cant figure it out from the docs. Any help would be great thanks!
Cheers
Daithi
Reply With Quote