[R] Wait for batch file to execute

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Thu Apr 13 17:24:13 CEST 2017


For future reference, this kind of question should usually be accompanied by information about your OS such as the sessionInfo function returns... but in this case just read about the wait argument to ?system2.
-- 
Sent from my phone. Please excuse my brevity.

On April 13, 2017 8:06:04 AM PDT, Archit Soni <soni.archit1989 at gmail.com> wrote:
>Hi All,
>
>I am using below code to execute a batch file on server to get me data
>from
>an API
>
>it looks like:
>
>shell.exec('<<path name>>\\file.bat')
>#do next step
>
>The problem is that this function shell.exec doesn't wait for the batch
>file to execute completely and jumps to next line of code.
>
>Any ideas how can I hold R to go for next line of code until and unless
>batch file has completed its execution.
>
>Many thanks.
>
>P.S: I tried to use shell() but it says could not find function shell



More information about the R-help mailing list