Skip to content
Back to formatted view

Raw Message

Message-ID: <jq8sdh$vct$1@dough.gmane.org>
Date: 2012-05-31T22:47:12Z
From: csrabak
Subject: RScript.exe and map directory issue
In-Reply-To: <29137.9040260383$1338496664@news.gmane.org>

Em 31/5/2012 17:40, Bert Jacobs escreveu:
> Hi,
> I'm trying to run on Windows 7 a scriptfile with Rscript.exe from within
> Excel 2010 with the following code:
> Call Shell(rPath&  "\Rscript.exe C:\Work\Latest\_Test.R", vbHide)
>
> The good news is: the above code works perfectly, but ...
>
> If I add white spaces to my map directory, like:
> Call Shell(rPath&  "\Rscript.exe C:\Work\Latest 1\_Test.R", vbHide)
>
> In the above case or the RScript.exe doesn't run the file anymore.
> Could someone explain to me how this comes and how I can deal with it?
>
Bert,

I'm not a Windows guru, and do not have Windows 7 available to ascertain 
it, but in earlier versions of Windows, the subterfuge used to be to 
employ the "8.3" short name of the file (in fact the whole path) to 
circumvent the issue of spaces in {file,directory}names.

To get the shortened name that Windows ascribe to a long, and 
potentially with spaces, in a filename you issue the command dir /x and 
you'd see a translation of longname to 8.3 filename.

HTH

--
Cesar Rabak