I use R under Windows on several machines.
I know you can set the working directory from within an R script, like this
setwd(\"C:/Documents and Setti
You could use an environmental variable. This can work with Sys.getenv() and Sys.setenv(). For instance:
Sys.getenv()
Sys.setenv()
> Sys.setenv(R_TEST="testit") > Sys.getenv("R_TEST") R_TEST "testit"
If you sent the variable in your script, you should be able to access it from within, and then call setwd() on that output.
setwd()