I'm trying to get part of a path. The complete path is c:\inetpub\wwwroot\drintranet\upload\filename.whatever. With the code below I'm searching the string for "\" at a designated position. For some reason it always returns the four characters before my designated start position and i can't figure out why. If I adjust the start position it will move to 5 characters before the next found . Any ideas?
Example of what it returns.
ranet\upload\bb.pdf - I was looking for everything after the \ before upload.
Set Upload = Server.CreateObject("Persits.Upload.1")
Count = Upload.Save("c:\inetpub\wwwroot\drintranet\upload")
Set curProcess = Upload.Form("txtprocess22")
Set curQuestion = Upload.Form("inQuestion")
Set curAnswer = Upload.Form("inAnswer")
Set curDepartment = Upload.Form("qaSelect")
curDate=date
curFile = Upload.Files("qaFile").Path
Dim curFlnm, curChar
curChar="\"
curFlnm = Right(curFile, InStrRev(curFile, curChar, 25, 0))