ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Delete task
Date Thu, 28 Aug 2003 05:25:12 GMT
I would try the DependSelector.
   <delete>
       <fileset dir="whereToDelete">
           <depend targetdir="whereToCompare"/>
       </fileset>
   </delete>

But I donĀ“t know if that is available in 1.4.1.
If not you can try to use that selector as a custom selector.

AFIAK selectors are long in ant so that should be possible. ... I hope.



Jan


> -----Original Message-----
> From: Daniel H A Lima [mailto:lima@cit.com.br]
> Sent: Wednesday, August 27, 2003 7:06 PM
> To: user@ant.apache.org
> Subject: Delete task
> 
> 
>     Hi guys, how are u ?
> 
>     How can i delete files in an "apply way behavior" ?
>     I must delete all files .ext1 for which exist the corresponding 
> .ext2. Like :
> 
> a.ext1 (it would be removed because a.ext2 exists)
> a.ext2
> b.ext1 (it would NOT be removed)
> c.ext1 (it would NOT be removed)
> d.ext1 (it would be removed)
> d.ext2
> some_dir/z.ext1(it would NOT be removed)
> some_dir/y.ext1(it would be removed)
> some_dir/y.ext2
> 
>     I don't want to use apply (and rm or del commands) 
> because i would 
> like to keep my build.xml as generic as possible (to run it under 
> Windows and Linux SOs). Any ideas ?
> 
> PS: I must use ANT 1.4.1.
> 
> 
>                                     Thanks in advance.
> 
> -- 
> ______________________________________________
> 
> Daniel Henrique Alves Lima, Software Engineer
> CiT Systems - Software enabling  the e-world
> lima@cit.com.br
> http://www.cit.com.br
> Phone: +55 19 3737 4596
>        +55 19 3737 4500
> Fax:   +55 19 3737 4501          
> ______________________________________________________________
> ___________
> 
> "Spike once ask me... What does it take for a soldier to become a 
>  leader... What differentiates the two ?
>  There is no difference. Sometimes certain soldiers are chosen to lead
>  other soldiers. (...) But they never stop being soldiers.
>  Because when the stakes are high... When the battle burns... When
>  the death seems near... You either fight or your don't. 
> You're either a
>  soldier or you're not. (...) I'm a soldier. I fight. That's 
> what i do."
> 
> 	            Optimus Prime : TF - G1 : DW
> ______________________________________________________________
> ___________
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

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