PC Review


Reply
Thread Tools Rate Thread

truncate string

 
 
Katrina
Guest
Posts: n/a
 
      16th Apr 2004
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
 
Reply With Quote
 
 
 
 
Katrina
Guest
Posts: n/a
 
      16th Apr 2004
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

>-----Original Message-----
>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
>.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Truncate String shapper Microsoft C# .NET 2 11th Mar 2009 03:17 AM
Truncate String cmdolcet69 Microsoft VB .NET 2 9th Oct 2008 10:51 PM
Truncate string =?Utf-8?B?YndtYWhlcg==?= Microsoft Excel Programming 3 8th Nov 2006 08:11 PM
Truncate string =?Utf-8?B?YndtYWhlcg==?= Microsoft Excel Programming 0 8th Nov 2006 02:17 PM
Truncate end of a string sudonim Microsoft Access 2 28th Sep 2004 09:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:24 PM.