Q: How to use Rscript in Windows 10 Command Prompt I want to run a R code (say a.R) from Windows Command Prompt. 
I tried this in CMD: 
   Rscript a.R

But gives me this error:
'Rscript' is not recognized as an internal or external command,
operable program or batch file.

A: For anything to run on the command line, it needs to be on your system path.
The error you get makes it sound like the directory containing the Rscript executable isn't on your system path. Add it to the path and it will work.
