truncate string

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
 
K

Katrina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top