I am not an ant expert, but how about this: a) Copy both the filesets into a directory, b) Sync the copied directory to one of the filesets, and you will be left with an intersection. the target sync need ant >1.6
<project name="sync-test" default="usage"> <description> description </description> <!-- ================================= target: default ================================= --> <target name="copy" description="Copy the files"> <copy todir="/home/rkalsi/testSync/dir3" overwrite="true" verbose="true"> <fileset dir="/home/rkalsi/testSync/dir1" /> <fileset dir="/home/rkalsi/testSync/dir2" /> </copy> </target> <target name="sync"> <sync todir="/home/rkalsi/testSync/dir3"> <fileset dir="/home/rkalsi/testSync/dir1" /> </sync> </target> </project> cheers, ramnish. -----Original Message----- From: Craeg Strong [mailto:[EMAIL PROTECTED] Sent: 14 July 2005 03:12 To: Ant Users List Subject: how would I perform set intersection or disjunction with filesets? Hello: Here is a fun question: does anyone have any ideas as to how one might go about producing a fileset that represents the INTERSECTION of two filesets? That is, it will include only those files that are in both filesets A and B. Another question: how might one produce a fileset that includes all those files from fileset A that are NOT part of fileset B? I believe selectors provide the capabilities I would need to get the above job done at a low level, but it might be nice to be able to perform set operations like this on filesets directly, for better code legibility and expressive power. Opinions? Ideas? Thanks in advance, --Craeg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]