ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: using fileset and date selector to get dirs unmofidied for 30 minutes
Date Tue, 16 Nov 2004 19:41:37 GMT
It looks like the <dirset> does not support Selectors. Can anyone confirm that this is
true? If so, I welcome any suggestions on how to accomplish this given the current functionality.
Thanks,

-Rob Anderson

> -----Original Message-----
> From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com]
> Sent: Tuesday, November 16, 2004 11:36 AM
> To: user@ant.apache.org
> Subject: RE: using fileset and date selector to get dirs 
> unmofidied for
> 30 minutes
> 
> 
> So I tried this out and it is not behaving as I expect. I 
> must be missing something. Here is my build.xml...
> 
> <project name="fileset_test" default="build">
> 
> 	<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
> 	<property name="inbound.dir" value="inbound"/>
> 
> 	<tstamp>
> 		<format property="30_minutes_ago" 
> pattern="MM/dd/yyyy hh:mm aa"
> 			offset="-30" unit="minute"/>
> 	</tstamp>
> 
> 	<target name="setupfileset.fordirs" 
> unless="inbound.file.extension">
>                 <echo>${30_minutes_ago}</echo>
> 		<path id="inbound.archives">
> 			<dirset dir="${inbound.dir}">
> 				<!--include name="*"/-->
> 				<date 
> datetime="${30_minutes_ago}" when="before"/>
> 			</dirset>
> 		</path>
> 	</target>
> 
>   <target name="build" depends="setupfileset.fordirs">
>     <foreach target="processeach" param="file">
>       <path refid="inbound.archives"/>
>     </foreach>
>   </target>
> 
>   <target name="processeach">
> 	<echo>${file}</echo>
>   </target>
> 
> </project>
> 
> This prints out all the directories and does not seem to 
> select only those that are unmodified in the last 30 minutes.
> 
> Please help. Thanks,
> 
> -Rob Anderson
> 
> > -----Original Message-----
> > From: RADEMAKERS Tanguy [mailto:Tanguy.RADEMAKERS@swift.com]
> > Sent: Tuesday, November 16, 2004 11:06 AM
> > To: Rob.Anderson@nike.com
> > Subject: FW: using fileset and date selector to get dirs 
> > unmofidied for
> > 30 minutes
> > 
> > 
> > for some reason my mailserver says it can't reach the list 
> > today so i'm
> > responding direct.
> > /t 
> > 
> > >-----Original Message-----
> > >From: RADEMAKERS Tanguy 
> > >Sent: Tuesday, November 16, 2004 8:04 PM
> > >To: 'Ant Users List'
> > >Subject: RE: using fileset and date selector to get dirs 
> > >unmofidied for 30 minutes
> > >
> > >try:
> > >  <tstamp>
> > >      <format property="30_minutes_ago" 
> pattern="MM/dd/yyyy hh:mm aa"
> > >              offset="-30" unit="minute"/>
> > >  </tstamp>
> > > 
> > >
> > >>-----Original Message-----
> > >>From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com] 
> > >>Sent: Tuesday, November 16, 2004 7:15 PM
> > >>To: user@ant.apache.org
> > >>Subject: using fileset and date selector to get dirs 
> > >>unmofidied for 30 minutes
> > >>
> > >>I would like to create a fileset that contain the directories 
> > >>that have not been changed in the last 30 minutes. The Ant 
> > >>equivalent of:
> > >>
> > >>find ./ -type d -mmin 30
> > >>
> > >>I think I can use a fileset with the date selector, but how do 
> > >>I get a date that is 30 minutes ago?
> > >>
> > >><dirset dir="." includes="*">
> > >>    <date datetime="${30_minutes_ago}" when="before"/>
> > >></dirset>
> > >>
> > >>The question is: How do I set the property 30_minutes_ago?
> > >>
> > >>Thanks,
> > >>
> > >>_________________________________________________________________
> > >>Robert Anderson  Sr. System Engineer  Nike - Global Trade IT  
> > >>(503) 532-6803  d
> > >
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message