See also CleanTempFiles() - Cleans up the temporary directories (or any arbitrary directory) .

You should also take a look at the UDF Forum in general as it contains various UDFs with regards to DIR and date manipulation.

And please post code in between [CODE] tags as described in ABC's of KiXtart board etiquette and message to new forum users
_________________________
There are two types of vessels, submarines and targets.