truncate string

  • Thread starter Thread starter Katrina
  • Start date Start date
K

Katrina

I want to truncate a path string, but I don't know how
many letters I want to keep. I know how many I want to
remove.

What I have is a file path
C:/somefoldersnames/ReadOnly Copy/
and what I want to be able to do is take that string and
cut off the "/Readonly Copy/" everytime.

Is there a way to do this? The length of the beginning
half of the path will be variable, so I can't use Left
(path, 20) or anything like that.

Thanks
 
Sorry, I figured out the answer to my own question... I
guess I should have searched a little longer....

i used

OrigPath = C:/somefoldersnames/ReadOnly Copy/
StrNum = Len(OrigPath)
NewPath= Left(OrigPath, StrNum - 15)]

Thanks anyway
 
Back
Top