@echo off
for %%i in (tests\*.exe tests\*.~dpr tests\*.dof tests\*.dsk tests\*.cfg tests\*.in tests\*.out tests\*.obj tests\*.class) do del %%i

for %%i in (.) do set problem_name=%%~ni
for %%i in (.\%problem_name%.*) do del %%~nxi