Quote:

If one file will be created each day then Cleandirectory with the optional parameter of deleting only files older than ten days would definitely fit the bill. It's all documented in the UDF header.




Not really.


Introducing a date based selection changes the action from "keep the last 10 files" to "keep the files that are no more than 10 days old" and is the sort of thing that will bite you unexpectedly.

Say you are on vacation for a week-and-a-bit. When you return to work the clean-up routine will delete all your backup files because they will be over the 10 day limit.

Without knowing what the appliaction is and how it runs we can't be sure that it's a problem in this particular case, but it certainly would be a problem in many cases.