Skip to content

executing R batch files

4 messages · joseph.g.boyer at gsk.com, Gabor Grothendieck, Greg Snow

#
Without the actual VBA commands you are using we
can't be sure but if you are using Shell then it requires an exe,
not a bat file.  Try
   cmd.exe /c RBatch.bat
so that it has an exe file to execute.
On Mon, Feb 2, 2009 at 6:42 PM, <joseph.g.boyer at gsk.com> wrote:
#
Let me guess, you are using MSwindows and using notpad as the editor.

Notepad has this annoying "feature" that if you save a file as a text file then it automatically adds '.txt' to the end of the file name.  So when you saved as a text file it actually named the file "Rbatch.bat.txt" and the computer could not find the file "Rbatch.bat" since that file does not exist (and even if it found the file, it is not a .bat file so it would not run it).  Windows by default also has the additional feature that it likes to hide these types of details from you for your own protection.

Windows assumes that the computer is smarter than the user and if you are doing something that was not anticipated by MS then you are clearly doing something wrong and should be prevented.

Apparently you are too intelligent to be using MSwindows and notepad (as could be said for anyone smart enough to use R).  Unfortunately some of us are in situations where the person who decides which OS we will use is either not too intelligent to use windows, or has not realized yet that they are.