One more for good measure (if the double double quotes are irritating)

shell 'cmd /c "C:\Program Files (x86)\Audacity\Audacity.exe"'

or

shell 'cmd /c "%ProgramFiles(x86)%\Audacity\Audacity.exe"'





On Fri, Mar 28, 2014 at 5:04 PM, Joe Bogner <[email protected]> wrote:

> This works for me - double set of double quotes
>
>  shell '""C:\Program Files (x86)\Audacity\Audacity.exe""'
>
> You can also get fancy with
>
>  shell '""%ProgramFiles(x86)%\Audacity\Audacity.exe""'
>
> and
>
>  shell '""%ProgramFiles%\Audacity\Audacity.exe""'
>
> Maybe have some logic to check both places to see if it exists.
>
> The use of %ProgramFiles% is like an environment variable
>
>
>
>
>
> On Fri, Mar 28, 2014 at 3:59 PM, Raul Miller <[email protected]>wrote:
>
>> Hmm... it does look like PROGRA~2 is a relatively stable reference to
>> c:\Program Files (x86).
>>
>> But %20 does not work as a replacement for the space character.
>>
>> I suppose another workaround is to generate a *.bat file in some location
>> without spaces in the name and run that (perhaps using cmd /c or
>> something...). That's disgustingly inefficient, but if that is the way
>> windows is designed, I guess I can live with people having to do that, at
>> least for a little while.
>>
>> Thanks,
>>
>> --
>> Raul
>>
>>
>> On Fri, Mar 28, 2014 at 6:02 AM, David Lambert <[email protected]
>> >wrote:
>>
>> > Use an alternate 8 character name
>> > '"C:\Progra~2\Audacity\audacity.exe"'
>> > or possibly
>> > '"C:\Program Files%20(x86)\Audacity\audacity.exe"'
>> >
>> >
>> >  Date: Fri, 28 Mar 2014 01:35:58 -0400
>> >> From: Raul Miller<[email protected]>
>> >> To: Programming forum<[email protected]>
>> >> Subject: [Jprogramming] space in file names?
>> >> Message-ID:
>> >>         <CAD2jOU9ETN9df5fcZSHNXYJQ_e=5i0Dg21oQoAOzUvaDADHGFw@mail.
>> >> gmail.com>
>> >> Content-Type: text/plain; charset=UTF-8
>> >>
>> >>   require 'task'
>> >>   shell '"C:\Program Files (x86)\Audacity\audacity.exe"'
>> >>
>> >
>> >
>> > ----------------------------------------------------------------------
>> > For information about J forums see http://www.jsoftware.com/forums.htm
>> >
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to