tags:

views:

601

answers:

2

I have several batch files that I call from a parent batch file. I need to trap if there are any errors that occur in the child batch files. When a child batch file makes a call to an exe file, I am able to trap the error in the child batch file just fine. How do I surface it up to the parent batch file?

+1  A: 

have you tried

exit /b errorlevel

from you child batch script?

akf
+1  A: 

Using exit /b %ERRORLEVEL% in the called batch file should percolate it up nicely.

lavinio