@echo off setlocal cd /d %~dp0 set err=0 for /f "tokens=*" %%d in ('dir /b/a:d') do ( call %%d\build.bat fc %%d\EXP=* %%d\OUT=* if errorlevel 1 ( set err=1 color 47 pause color ) ) if %err% == 1 color 0C if %err% == 0 color 0A pause color