IF (NOT EXIST %Main_PATH%File_Extract\Status\File_Extract_Main%JobNbr%_OK.txt) ( REM powershell -NoProfile -ExecutionPolicy Bypass -Command "Write-EventLog -LogName 'VACCN' -Source 'DataRepo' -EventID 5120 -EntryType Error -Message 'Fatal error in VA Extract process.'" REM call %Main_PATH%EventWriterWriter\Scripts\release\EventWriter.exe %JobNbr% "DR_101" "batchfile" "Fatal error in VA Extract process." EXIT 11 ) ELSE ( REM powershell -NoProfile -ExecutionPolicy Bypass -Command "Write-EventLog -LogName 'VACCN' -Source 'DataRepo' -EventID 5100 -EntryType Information -Message 'Successful completion of Extract Job 89.'" REM echo “Successful completion” EXIT )and it returned from the job: