You don't give code so my answer will be just an advise or what I would do for such job.
- Use
Rscript.exe
it is the way to go for batch script. R CMD is a sort of legacy tool. - You don't need to set or change the working directory. It is a source of problems
You can launch you bat file where you want and within it you go to R script location using cd for example you bat file can be like:
cd R_SCRIPT_PATH Rscript youscript.R arg1 arg2
You can use one of the script argument as an output directory for your result files. For example inside your script you do somehing like this:
args <- commandArgs(trailingOnly = TRUE) resultpath <- as.character(args[1]) ..... write.table(res1, file=paste(resultpath,'res1.csv',sep='/')