tags:

views:

30

answers:

1

Is there a way to delete duplicate files using ant? Specifically, if I have the same file name in two different output directories, I want to delete it from the second directory.

+3  A: 

I think I came up with a solution.

<target name="delete-duplicates">
    <delete>
        <fileset dir="delete-here" includes="**/*">
            <present targetdir="if-present-here" />
        </fileset>
    </delete>
</target>
Craig P. Motlin