I am trying to to Call a bat file then waiting for an expected execution time and then act on the execution result of the second batch file , It will be like . 1- First Batch file "Main_file.bat"
@ECHO OFF
CALL Second_file.bat
echo LEVEL = %ERRORLEVEL%
ping -n 5 localhost >nul
echo LEVEL = %ERRORLEVEL%
IF [%ERRORLEVEL%] == [5] (
taskkill /IM "app.exe" /F
)
2- "Second_file.bat"
@ECHO OFF
ECHO -------START-----------
python CI_prallel_d.py CDPO_L2_INT Setter
::Set ERORRLEVEL
exit /b 5
I want to Know how to Ignore the exit code for ping command and act on the exit code of my second_file.bat is there a way ?