开发者

How can I find and delete empty files?

As a result of an Ant process, I generate several files (the contents of a batch svn diff). In this case, some diff files are empty, so I would like to delete them aut开发者_JAVA技巧omatically so I can concentrate only on the differences.

Is there an Ant task that would allow me to delete all files with 0 bytes easily?


Try the delete task using a fileset and the size attribute.


<delete ...>
<fileset ...>
<size value="0" when="equal"/>
</fileset>
</delete>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜