ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
Subject Re: Conditional execution of tasks
Date Thu, 31 Aug 2006 22:06:03 GMT
Hello Charles,

you can build a fileset using the different selector which will be the fileset you will copy.
Read under concept and types in the manual what is the different selector.

Here a possible solution :

<target name="copy">
   <fileset dir="origin" id="tocopy"> 
       <different targetdir="copydir"/>
   <pathconvert refid="tocopy" setonempty="false" property="tocopy"/>
   <copy todir="copydir">
       <fileset refid="tocopy">

<target name="postcopy" if="tocopy" depends="copy">
    <!-- do here something only if and only there was something to copy -->


-------- Original-Nachricht --------
Datum: Thu, 31 Aug 2006 14:47:39 -0300
Von: "Charles Abreu" <>
Betreff: Conditional execution of tasks

> Hi,
> A use a copy task to copy modified files from one directory to another
> directory. I need to run another task if, and only if, at last one file
> was
> copied. Is this possible?
> Thanks!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message