Making a clean sweep
In my home setup, I use a simple clean.bat before each checking, including the following line:
for /d /r . %%d in (__history) do @if exist "%%d" rd /Q /S "%%d"
The recursive for + exist has a big advantage over the classic DIR /S ... it will not throw an obnoxious File Not Found if there happen to be no history folders at all.
Addendum: disabling the history in the IDE
Delphi 2010 and above make it really easy to disable the functionality. From the main menu, choose Tools, Options, Editor Options, then uncheck the Create backup files checkbox.
No more backup files or _history folders will be created, works like a charm!
(*) Not really, and I tend to turn it off... but I suspect Delphi updates turn it back on, and I share source with various people that prefer to leave it on, so I always end up with a lot of these folders in my source tree anyway.
No comments:
Post a Comment