I have two batch files, task.bat and runtask.bat . runtask.bat calls task.bat , and I would like runtask.bat to get the exit code of task.bat into a variable. How can I do that?
task.bat:
@echo off set errorlevel=1
runtask.bat
... CMD /C task.bat set taskexitcode=????
James source share