Hi Michael,

I use ShellPath and PathTypeShell extensively and with 2006r4 and  
2007r1, my results have been pretty consistent (there was a bug in  
2006r3 and earlier that would sometimes return a MacPath (colon  
delimited) when you specified ShellPath, but this is fixed in my  
experience in the latest two versions.

However, you don't need to do all of that manipulation as long as  
you're using the default shell class.  All you really need is one line:

        s = source.ShellPath

That will give you what you need, including properly escaped spaces  
and special characters.

Tim
--
Tim Jones
[EMAIL PROTECTED]


On Feb 19, 2007, at 2:29 AM, Michael Gerbes wrote:

> A quick follow-up question:
>
> Converting from the Folderitem to the shellpath:
>
> (source as folderitem)
>
>   dim s, sneu as string
>   s = source.ShellPath.ConvertEncoding(Encodings.UTF8)
>
>   for i as integer = 0 to lenb(s)
>     dim t as integer = midb(s,i,1).ascb
>     if t > 127 then
>       sneu = sneu + "\"+Oct(t)
>     else
>       sneu = sneu + midb(s,i,1)
>     end if
>   next
>
> I am obviously doing something wrong here, because the shell is  
> still not recognizing this path...
> Thanks,
> Michael
>
>
>
> Am 13.01.2006 um 20:39 schrieb Alexander Cohen:
>
>> Youre a genius, thanks a million!
>>
>> Alex
>>
>> On 13-Jan-06, at 1:34 PM, Joseph J. Strout wrote:
>>
>>> At 1:10 PM -0500 1/13/06, Alexander Cohen wrote:
>>>
>>>> When i get a shellPath for a file containing an 'É', the  
>>>> shellPath contains 'e\314\201'. Does anyone know of a way to  
>>>> convert from and to these two strings?
>>>
>>> What you see in the ShellPath is, I believe, the octal  
>>> representation of the bytes.  So take your 314 and 201, convert  
>>> them from octal into integers, and use ChrB to convert them into  
>>> strings and stuff them into the appropriate place in your  
>>> converted string.  Then, when done, remember to use  
>>> DefineEncoding to let RB know that this pasted-together bunch of  
>>> bytes is really UTF-8 text.
>>>
>>> To go in the other direction, scan your UTF-8 string with AscB,  
>>> and take any byte beyond the ASCII range (0-127) and represent it  
>>> as octal.
>>>
>>> Best,
>>> - Joe
>>>
>>> --
>>>
>>> Joseph J. Strout
>>> [EMAIL PROTECTED]
>>> _______________________________________________
>>> Unsubscribe or switch delivery mode:
>>> <http://www.realsoftware.com/support/listmanager/>
>>>
>>> Search the archives of this list here:
>>> <http://support.realsoftware.com/listarchives/lists.html>
>>
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives of this list here:
>> <http://support.realsoftware.com/listarchives/lists.html>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to