[R] Shell command help

Joshua Wiley jwiley.psych at gmail.com
Thu Jun 3 07:13:11 CEST 2010


On Wed, Jun 2, 2010 at 9:40 PM, RICHARD M. HEIBERGER <rmh at temple.edu> wrote:
>> #Error that is returned from above code…..
>>
>> >'C:\Program' is not recognized as an internal or external command,
>> operable program or
>
>
> This statement means that the Windows CMD processor does not realize that
> 'C:\Program Files' is a single word.  Use the 8.3 version of the filename
> 'C:\progra~1' instead.  Get the correct 8.3 name for your computer from the
> Windows
>   dir /x
> command on the appropriate directory.  Maybe you can use the ENVIRONMENT
> variable  %PROGRAMFILES% directly.  Sometimes you can use explicit quotation

just wanted to add that I routinely use environment variables directly
for paths from the Windows command prompt.  shell() seems to be okay
with it too.  For example this should (confirmed on on Windows
versions 5.1.2600 and 6.1.7600) open the basic calculator:

shell("%WINDIR%/System32/calc.exe")


> marks "c:\Program Files\rest of path\yourprogram.exe" to get past this
> issue.
>
> This problem may be happening inside the program you are calling, not at
> your level.
>
> Uwe, a discussion of %PROGRAMFILES% and 8.3 names needs to be added
> to the Windows FAQ.  I think it belongs in "Section 5 Windows Features"
> because it is
> a standard Windows feature to put software in the "Program Files" directory
> with an
> embedded blank in its name and it is a standard MSDOS feature to trip on
> embedded blanks.
>
> Rich
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>


-- 
Joshua Wiley
Senior in Psychology
University of California, Riverside
http://www.joshuawiley.com/



More information about the R-help mailing list