Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2009
    Posts
    16

    Unanswered: copy all character of a string from the right until the first \

    Hi Folks

    I have a string that contains a

    path "C:\FirstFolder\SecondFolder\Photo.jpg".

    What I need is "Photo.jpg" this name will be different in length every time I check the string.

    Is there a way to obtain all character from the right until the first \?

    Thanks For you help.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    untested code
    Code:
    filename = Mid$(filepath, InStrRev(filepath, "\") + 1)
    George
    Home | Blog

  3. #3
    Join Date
    Sep 2009
    Posts
    16

    Solved

    Thanks Mate

    thats what I used

    filename = Mid$(filepath, InStrRev(filepath, "\")

Posting Permissions

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