Find the path to R.exe or Rscript.exe on your computer. If you try to run R.exe from the command line, you enter an R terminal
In Rscript.exe case you can see additional usage options.
Find the path to R file.
Open Notepad and combine paths together (with quotation marks if needed and additional commands “CMD BATCH” if you choose to go with R.exe).
1
“C:\Program Files\R\R-3.4.3\bin\R.exe” CMD BATCH C:\Users\myusername\Documents\R\Send_Outlook_Email.R
Save as file with extension .bat (for example send_email.bat).