Given two directories A and B how do I use Ant to delete all files in B
that also exist in A?
ie
If A contains the files: one.file, two.file, three.file
and B contains the files: one.file, three.file, fish.file
I want to delete one.file and three.file from B.
I haven't been able to work out how to achieve this and haven't found
anything like this in the mailing list archive, so any ideas would be
great.
I tried this:
<delete dir="B">
<fileset dir="A">
<include name="*"/>
</fileset>
</delete>
But this deleted all the files in both A and B. :-(
Then I tried this
<delete dir="B">
<fileset dir="A">
<include name="*"/>
</fileset>
<mapper type="flatten"/>
</delete>
But delete doesn't support mappers.
Any ideas?
Cheers,
Bevan.
--
_______________________________________________________________________
Bevan Arps, OO Analyst email: [EMAIL PROTECTED]
ACT Financial Systems "Programming is an Art Form that Fights Back"
***********************************************************************
This communication is confidential to ACT Financial Systems (Asia
Pacific) and is intended for use only by the addressee. The views
and opinions expressed in this email are the senders own and do not
represent the views and opinions of ACT Financial Systems (Asia
Pacific).
***********************************************************************