_BATCH returns the current batch file nesting level. It is 0 if no batch file is currently being processed.

 

Batch files are nested with the internal CALL command.