@echo off

cls
echo !WARNING!
echo THIS REMOVE ALL C.BAT and L.BAT FILES IN PROJECTS FOLDERS
echo THIS REMOVE ALL CRTCV.MAP, CRTCV.NOI AND CRTCV.LK FILES IN PROJECTS FOLDERS
echo THIS REMOVE ALL *.REL FILES IN PROJECTS FOLDERS
echo CANCEL THIS BATCH FILE IF IT'S NOT WHAT YOU WANT TO DO
echo.
pause
echo DELETING ALL C.BAT FILES
FOR /D %%P in (./*) DO ( IF EXIST %%P\C.BAT DEL %%P\C.BAT )
if EXIST c.bat DEL c.bat
if EXIST s.bat DEL s.bat
echo DELETING ALL L.BAT FILES
FOR /D %%P in (./*) DO ( IF EXIST %%P\L.BAT DEL %%P\L.BAT )

if EXIST l.bat DEL l.bat
echo DELETING ALL CRTCV.MAP FILES
FOR /D %%P in (./*) DO ( IF EXIST %%P\CRTCV.MAP DEL %%P\CRTCV.MAP )
echo DELETING ALL CRTCV.NOI FILES
FOR /D %%P in (./*) DO ( IF EXIST %%P\CRTCV.NOI DEL %%P\CRTCV.NOI )
echo DELETING ALL CRTCV.LK FILES
FOR /D %%P in (./*) DO ( IF EXIST %%P\CRTCV.LK DEL %%P\CRTCV.LK )
echo DELETING ALL *.REL FILES
FOR /D %%P in (./*) DO ( FOR %%c in (./%%P/*.REL) DO DEL %%P\%%c )
echo DONE
pause

cls
echo !WARNING!
echo THIS REMOVE ALL RESULT.ROM FILES IN PROJECTS FOLDERS
echo CANCEL THIS BATCH FILE IF IT'S NOT WHAT YOU WANT TO DO
echo.
pause
echo DELETING ALL RESULT.ROM FILES
FOR /D %%P in (./*) DO ( IF EXIST %%P\RESULT.ROM DEL %%P\RESULT.ROM )
echo DONE
pause

cls
echo !WARNING!
echo THIS REMOVE ALL CCI2.EXE FILES IN PROJECTS FOLDERS
echo CANCEL THIS BATCH FILE IF IT'S NOT WHAT YOU WANT TO DO
echo.
pause
echo DELETING ALL CCI2.EXE FILES
FOR /D %%P in (./*) DO ( IF EXIST %%P\CCI2.EXE DEL %%P\CCI2.EXE )
echo DONE
pause

cls
echo.
echo CLEAN UP COMPLETED
pause
