@echo off  
for /r %%D in (.) do (  
    if exist "%%D\*.bak" (  
        echo Deleting .bak files in folder: %%~nxD  
        del /q "%%D\*.bak"  
    )  
)  

for /r %%D in (.) do (  
    if exist "%%D\*.tmp" (  
        echo Deleting .tmp files in folder: %%~nxD  
        del /q "%%D\*.tmp"  
    )  
)  

set "targetDir=project\MDK-ARM\project"  
  
if exist "%targetDir%\*.*" (  
    echo Deleting files in %targetDir%...  
    del /q /f "%targetDir%\*.*" 
)  
  
set "targetDir=project\MDK-ARM\"  

if exist "%targetDir%\project.uvguix.*" (  
    echo Deleting files project.uvguix 
    del /q /f "%targetDir%\project.uvguix.*"   	
)  

echo Deletion complete.  

pause