Batch script, render layers

I usually use a batch script to render multiple files. For example to render a couple of files in mental ray:

Render -r mr /path/to/file1.mb
Render -r mr /path/to/file2.mb

I usually have to use the -r mr to call Mental Ray even if Mental Ray is the chosen render in the render settings of the saved file. not sure why this is. anyway this is not a problem since I can specify in the batch script. My question is, what if I'm using render layers? I have tested this out, and all the files render using Maya software despite the render settings of the various layers. Is there a render flag that allows the the script to access the render setting? Thanks for reading.

then you use Render -r file /path/to/scene.mb

why? :S I will look into -r file. Not sure what that does.

--

here is the flag for rendering each render layer seperately, from the help. This seemed to work.

-rl boolean|name(s) Render each render layer separately

Set up like this:

Render -rl layer1 -r mr /path/to/file1.mb
Render -rl layer2 -r sw /path/to/file1.mb