[PD-dev] Tcl exec vs. Microsoft filenames

B. Bogart ben at ekran.org
Tue Jan 17 20:10:43 CET 2006


Too add quotes to your command try this:

format "\"file:%s\"" $file

the string contained in "" contains the excapted quotes \"

I hope that does it.

.b.

Hans-Christoph Steiner wrote:
>
> This is win32.  rundll32 url.dll,FileProtocolHandler doesn't like
> "file:C:/Program%20Files" from my tests.  This is Microsoft we are
> talking about, they do things their own way, standards be damned.
>
> .hc
>
> On Jan 17, 2006, at 1:26 PM, B. Bogart wrote:
>
>> yuck, URIs don't have spaces, you put one in a web-page you its  replaced
>> with %20 in the URI.. I guess you could have to replace spaces with %20
>> and see if that works.
>>
>> Try just opening the file in a browser and note the URL it uses to
>> open it.
>>
>> I assume this happens on win32, but its been too long for me to know...
>>
>> .b.
>>
>> Hans-Christoph Steiner wrote:
>>
>>>
>>> In u_main.tk, in the procedure menu_openhtml, this little snippet of
>>> code does not work when there is a space in the file name (i.e.
>>> C:/Program Files/pd/doc), but works fine when there are no spaces:
>>>
>>>           exec rundll32 url.dll,FileProtocolHandler \
>>>                 [format "file:%s" $filename] &
>>>
>>> This opens HTML, etc from the menu/help browser, so it would be most
>>> helpful to have it working.  I have tried a number of things to no
>>> avail.
>>>
>>> Any Tcl-meisters want to take a stab?  Matju?
>>>
>>> .hc
>>>
>>> ______________________________________________________________________
>>> __
>>> ____
>>>
>>>  As we enjoy great advantages from inventions of others, we should be
>>> glad of an opportunity to serve others by any invention of ours; and
>>> this we should do freely and generously.
>>>                                                   - Benjamin Franklin
>>>
>>>
>>> _______________________________________________
>>> PD-dev mailing list
>>> PD-dev at iem.at
>>> http://lists.puredata.info/listinfo/pd-dev
>>>
>>>
>
> ________________________________________________________________________
> ____
>
> Man has survived hitherto because he was too ignorant to know how to
> realize his wishes.
> Now that he can realize them, he must either change them, or perish.
>                                                         -William Carlos
> Williams
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20060117/38fa3526/attachment.pgp>


More information about the Pd-dev mailing list