Cleaning path name

Results 1 to 2 of 2

Thread: Cleaning path name

  1. #1
    Adrian Guest

    Default Cleaning path name

    I am using "Software Artisans - SA-FileUp V3.1" to upload files from my website and I enter the filename into my database but I need to get rid of the path name to the file.<BR>This is what it looks like: c:Inetpub echspy
    aceplacesubaru.jpg<BR>This is how I need it to look:<BR>subaru.jpg<BR><BR>some how i need to delete the first part, I&#039;ve never done this before and need some direction.<BR>I tried the help file on their web site but came up with nothing.<BR><BR>Thanks<BR>-Adrian

  2. #2
    Join Date
    Dec 1969

    Default RE: Cleaning path name

    first let me say im sure this is a better way to do this but one quick way i can think to do it woudl be to start at the right side of the string and keep steping back till you find the "\" character. <BR><BR>the other way woudl be to split the string using "\" and take the last element in the array that split returns.<BR><BR>there are probebly better ways but if you not worried about speed or anything either of those ways will work.

Posting Permissions

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