ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ciramella, Edward" <>
Subject <date> selector
Date Fri, 07 Feb 2003 22:11:08 GMT
I want to write a target to delete all items that are after a particular

Before I roll this out, I wanted to test my functionality in the following
-create a file
-sleep 2 min
-create a file
-sleep 2 min
-create a file
-sleep 2 min
-create a file

-take a timestamp
-delete all files older than timestamp -2 min

every time I run this it deletes all my files vs just the ones that are
currenttime-2min old.

What am I missing?

<target name="build">
     <touch file="myfile-1.txt"/>
 <sleep minutes="2"/>
     <touch file="myfile-2.txt"/>
 <sleep minutes="2"/>
     <touch file="myfile-3.txt"/>
 <sleep minutes="2"/>
     <touch file="myfile-4.txt"/>
     <format property="" pattern="MM/DD/yyyy hh:mm a" locale="en"
offset="-2 unit="minute"/>

 <echo message="${}"/>
     <fileset dir="." includes="**/*.txt"> 
	<date datetime="${}" when="before"/>


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message