This can be easily achieved by using different RenderLayers, and then outputting the different layers into one Multilayer EXR file; this file can then be opened to separate the different layers into separate files.
To do this, open the Properties panel, switch to the
RenderLayers tab and add however many Render Lawyers you need, each with the adequate Scene Layers selected.
Then switch to the Compositor, by pressing Shift + Left Arrow, or by using the layout selector in the header. Then add the same amount of Render Later nodes as you have RenderLayers. After that add a File Output node; with it selected, open the Properties panel (press N) and in the
Properties subsection select the output format
EXR Multilayer, and bellow click the
Add layer button. You can name the layers of you want. Then simply connect all Render Lawyers to the output node and your ready to render.