Trimming a String

Results 1 to 2 of 2

Thread: Trimming a String

  1. #1
    Join Date
    Dec 1969

    Default Trimming a String

    Hi-<BR><BR>I need help with this.<BR><BR>Root = "folder1folder2folder3"<BR><BR>Now someone is going back through the files so, they hit an up button and...<BR><BR>Root = "folder1folder2"<BR><BR>How could I get that to happen... I&#039;ve been trying things like<BR>Splitter = Split(Root, "\")<BR>For i = 0 To UBound(Splitter)<BR>Response.Write Splitter(i)<BR><BR>But I can&#039;t quite figure out the right use of functions.<BR><BR>Thanks,<BR>Jeremy#121

  2. #2
    Join Date
    Dec 1969

    Default Easiest way...

    &#060;%<BR>path = "folder1folder2folder3" <BR><BR>upOne = Left( path, InStrRev( path, "\" ) - 1 )<BR>%&#062;<BR><BR>Look up InStrRev in the VBS docs.<BR><BR><BR>

Posting Permissions

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