开发者

How can I find and delete empty files?

开发者 https://www.devze.com 2022-12-23 09:44 出处:网络
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

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

精彩评论

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