>>the problem is and i should have been more specific is the table looks more like this:
>>c:\path\_____c:\path\path\________c:\path\path\path
>>
>>the underscores represent spaces.
>>really it is just the last one with the three paths that is missing the '\'. the other problem is that the path's are not always uniform. it will vary in length throughout this field pending on where i want to point it.
>>thanks
>
>if it's only the last path in the string missing the bs, addbs() will still work.
>
>If it could be any of them, how about:
>
>
x = "c:\path\ c:\path\path\ c:\path\path\path"
>aline(lines, x, .f., " ")
>This will give you an array that looks something like
>
lines[1] = "c:\path\"
>lines[2] = ""
>lines[3] = ""
>lines[4] = c:\path\path\
>lines[5] = ""
>etc...
>
>
>now do a addbs on all the lines in the array and put them back together in a single string. Note: AddBs() on an empty string returns an empty string.
>
>hth
2 problems I see with this approach - firstly (which may not be a problem) the resulting string will be longer than the original (by the number of inserted BS), second (most importantly) it will cause havoc if the paths contain spaces.
Maybe checking to see if second char is : before adding BS would get around problem.
Len Speed