FOR

delete .tmp files in a given directory

remove_tmp_files.bat

@ECHO OFF
cd "C:\somedir"
FOR %%f in (*.*) do if %%~xf == .tmp del "%%f"