批处理 遍历删除delphi源码文件夹下dcu等所有类型的临时文件,包括其子文件夹

@echo off
setlocal Enable,ayedExpansion

set "searchPath=%cd%"

echo deleting .dcu and ~pas files under %searchPath% ...

for /r "%searchPath%" %%f in ( 
, *.~ddp
, *.~dpr
, *.~pas
, *.~pa
, *.~dfm
, *.$$$
, *.dcu) do (
    del "%%f"
    echo deleted "%%f"
)

echo All .dcu and ~pas files have been deleted.
 

你可能感兴趣的:(Delphi,pascal,batch)