删除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 ****************************

 

转载于:https://www.cnblogs.com/Jekhn/archive/2010/12/29/1920379.html

你可能感兴趣的:(删除Delphi临时文件的Bat)