删除Delphi临时文件的Bat

删除Delphi临时文件的Bat,保存成Bat文件,请注意以下代码同时删除了*.dcu文件。

代码
Rem Delete Delphi temporary file
Rem
****************************
@echo Delete Delphi temporary file
@
dir/w/s *.~* *.dcu
@echo 以上为当前目录及子目录临时文件,请按任意键确认删除!!!
@
pause
@
for /r . %%a in (.) do @if exist "%%a\*.~*" del "%%a\*.~*"
@
for /r . %%a in (.) do @if exist "%%a\*.dcu" del "%%a\*.dcu"
@echo 删除成功!
@
pause
Rem ****************************

 

posted @ 2010-12-29 11:06  Jekhn  阅读(1162)  评论(1编辑  收藏  举报