::
:: cleans delphi projects
:: (c)2010, Armin Pfäffle
::

@echo off

:: remove all unnecessary files
del /S /Q *.local
del /S /Q *.dcu
del /S /Q *.hpp
del /S /Q *.identcache
del /S /Q *.2007
del /S /Q __history

:: remove __history-directories
for /f "tokens=*" %%i in ('dir /ad /b /s *__history') do rd /s /q "%%i"

:: let the user choice if exe-files should be deleted to
choice /M "Delete *all* EXE files"
if %errorlevel% == 1 del /S /Q *.exe
