#133428 - 2005-02-09 09:36 AM
Re: Delete all files exept the latest?
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
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.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|