Delete temp files in Delphi

Add the following line in your autoexec.bat file: 

if not exist% temp% \ *. TMP goto EndTMP 
atrrib% temp% \ *. TMP-r-a-s-h 
del% temp% \ *. TMP 
: EndTMP 

So from now on every time your computer is booting, it automatically delete the files *. TMP.