tags:

views:

12

answers:

1

Hello everyone,

My ultimate goal is the following : delete all content from a directory that is older than a given date.

What I'm willing to achieve is removing all backup directories that are more than 7 days old compared to today's date. I could check the directories based on their OS timestamp (Windows 2003) or the directory name which holds the date it has been created at.

I know I'll have to deal with but I'm wondering on the best way to do that, if this command can filter these files for me, since it initially has to do some basic computation on dates.

Any help / directions will be greatly appreciated.

Cheers /J

A: 

Ant has only very limited date handling support. I suggest to either write a small Java program (< 40 lines of code) or use a scripting language like Python. Or PowerShell if it's already installed.

Aaron Digulla