Batch returns after FOR command

M

Mark Zbikowski \(MSFT\)

"Call" just nests within CMD's data structures.

CMD /C starts an entire new process.

You cannot easily simulate CALL :label with a CMD /C since this may have
side effects.
 
K

Karl Bernard

So, for clarity, with "CALL" I could call (jump to) a label within the same
script (much like a GOTO), or call another script?

I understand that CMD invokes another interpreter, so I guess using CALL
could also be more "resource friendly" by invoking fewer new processes?

Thanks,

Karl
 
M

Mark Zbikowski \(MSFT\)

CALL is like a subroutine call. It does NOT launch another CMD.

CMD *is* the command interpreter. So doing CMD /C is invoking
another process.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top