After an extremely long time I’ve made an update to the DeleteOld console app and updated the CodeProject article. The original was .NET 1.1 – this one’s now 2.0 (I’m not on 3 yet!)
It still does the same things it did – deletes files of a specified age, but now also:
- Allows files to be deleted ‘newer’ than a certain age as well as ‘older’
- Allows files to be deleted based on an absolute date (overriding the timeframe arguments)
- Allows the ‘root’ path to be preserved if ‘remove empty folders’ is selected and the path specified is empty.
- Fixed a bug in Arguments parsing regex as noted by dudik
- Changed output datetime format to ‘full’ rather than specific dd/mm/yyyy as noted by a.plus.01
I had a need for the absolute date, so thought I may as well cover off a few other things.
Hope it’s of some use…
You can also see my other CodeProject articles.
I just found that the top entry in google for ‘codebureau’ is actually some listing on prevx.com (which I’d never heard of) that’s seeming to suggest that DeleteOld (a console app I posted on CodeProject some time ago) is possibly spyware/malware – bloody cheek! I’d be interested to know how this pops up on that tool, and also whether the .NET code has some flaws that means it can be used in a malicious way. At least then I could defend myself.
This new article talks about the options available for string enums in C# – just one of those little quandaries you find yourself up against from time to time….
This article runs through some amendments I’ve made to an already excellent VS Addin to ‘visualise’ datasets in the IDE. There’s definitely some improvements that can be made, but it shows how you can use the debugger to return useful information at runtime…
This new article goes through more of a journey of unit testing a console app than anything else – but might prove useful to people…