使用ant删除重复文件? [英] Delete duplicate files using ant?

查看:19
本文介绍了使用ant删除重复文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用 ant 删除重复文件?具体来说,如果我在两个不同的输出目录中有相同的文件名,我想从第二个目录中删除它.

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.

推荐答案

我想我想出了一个解决方案.

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>

这篇关于使用ant删除重复文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆