If the existance of a file is your condition, use a combination of <available>, <antcall>, <target if= and <target unless= . Check out the example below...
<available property="it.exists" file="path/to/some/file"/> <target name="do.this.or.that"> <antcall target="do.this"/> <antcall target="do.that"/> </target> <target name="do.this" if="it.exists"> ... </target> <target name="do.that" unless="it.exists"> ... </target> You could probably do something similar for equal files with the <condition> task. -Rob Anderson > -----Original Message----- > From: Paul Pogonyshev [mailto:[EMAIL PROTECTED] > Sent: Friday, February 17, 2006 7:04 AM > To: user@ant.apache.org > Subject: conditional execution > > Hi, > > Is it possible to do some sorts of conditional execution of > tasks other than <target if/unless="..."> and scripts > (require extensions)? > > I need things like if file exists, do this, else do that. > Or, if files are equal (byte-wise), do something. > > Paul > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For > additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]