How to get a BATCH file executed from a web page?

I have a single line batch file that I want to call from a web page with a button, what is the best way to do this?

The BATCH file is as follows:

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

Or you can simply call the R script directly from the web page and generally skip the BATCH file. Can this be done? This is all done on the local host, so I don’t think there should be a problem with permissions, etc.

Any help would be greatly appreciated.

Respectfully,

Anthony.

+4
source share
1 answer

You must add

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

into your HTML, and then configure your web server to process the script package as a CGI program. How this is done depends on the web server used.

+4
source

All Articles