tags:

views:

40

answers:

1

Hi All, I have a one line batch file that I want to call from a web page via a button what is the best way to achieve this?

The BATCH File is as follows:

c:\R\bin\Rscript.exe "c:\Users\user\Desktop\Shares.R" 

Or is it possible just to call the R script straight from the web page and skip the BATCH file altogether, Can this be done? It is all being done on a local host so I don't think there should be a problem with permissions etc...

Any Help would be greatly appreciated.

Regards,

Anthony.

+2  A: 

You have to add

<form action="YOUR_BATCH_FILE"><input type="submit"/></form>

to your HTML and then configure your web-server to treat your batch script as a CGI program. How this is done depends on the web server you are using.

pafcu