----- Original Message ----- From: "Stefan Bodewig" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 08, 2001 8:08 AM Subject: Re: Directory image task
> Jose Alberto Fernandez <[EMAIL PROTECTED]> wrote: > > > Guys, > > > > The only thing I need (I think) is having the semantics of: > > > > <copy src dest/> > > <delete dest if="not in src" /> > > > > So, any takers for a <sync> task for Ant 1.4 - or should I add it to > the wish list for Ant2? > I thought a little bit about this task and I think it may be possible to solve this with the existing task (if there will be a little change). You could use <apply executable="rm" dest="D:\temp\d1" parallel="false"> <targetfile/> <fileset dir="D:\temp\d2" includes="*"/> <mapper type="identity"/> </apply> Which will find the files which are in D:\temp\d2 but not in D:\temp\d1. Problem is that the name of the sourcefile is automatically appended and you will get get error-messages from the operating system since they don't exist :-) Don't know if this really is a problem? Another problem might be that it can't execute shell-commands on Windows (and Unix??) since something like "cmd /c del" as an executable is changed to "cmd \c del" on execution. So if we would change the bahaviour of apply (and executeon) to only append sourcefile's automatically if none of </srcfile> and </targetfile> is specified it should do it's work. But that may break builds. Nico --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]