一键清除Delphi中无用的文件
delphi確實好用,但它生成的各種文件,有時對我們來說基本沒用,隨著我們做的項目越來越多,其中無用的文件有時能占到三分之一。今晚寫了個小工具,可以遞歸清理 delphi文件夾下無用的文件。
代碼如下:
@echo "清除Delphi中的無用文件 1.0"
@echo "作者:DC"
@echo off?
if ? "%1"=="" (goto currentPath)
?else goto pointPath
:currentPath
set work_path=. ?
:pointPath
set work_path=%1?
@echo 確定要清理%work_path%嗎?
choice /c ny /m "確定按Y,取消按N"
rem errorlevel1對應n,2對應y
if errorlevel 2 goto continue
if errorlevel 1 goto complate
:continue
cd %work_path%?
for /R %%s in (.) do (?
?rem echo %%s?
rem 刪除delphi無用文件
rem del ~*.* /s
?del *.~* /s
?del *.obj /s
?del *.dcp /s
?del *.dcu /s
?rem del *.dpl /s
)?
:complate
echo "運行完畢"
pause?
總結
以上是生活随笔為你收集整理的一键清除Delphi中无用的文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 调用webservice或wcf时,提示
- 下一篇: 飞秋(FeiQ)已在计算机技术的世界里沉