delete works better than you think ...
Well, it's been 4 years since dreamzzz posted their question, but being I just ran into this (after forgetting about how Ant works from years ago), and being this page got a top hit from Google, I thought I'd post something relevant:
A typical delete might be to recursively delete all files in a tree - *including* the directories - but leave files of certain patterns. Something like:
<delete>
<fileset dir="${wrk.buildFilePath.dir}">
<include name="**"/>
<exclude name="**/projlib-build.xml"/>
<exclude name="**/*-projlib.zip"/>
</fileset>
</delete>
At first look, it seems to delete only those files in the base directory, but it leaves all the directories in place, so you might think it doesn't delete files recursively, but it does! A closer examination reveals that it's being quite literal, deleting only files. To get the intended behavior, simply request that emptry directories are deleted (not true by default):
<delete includeemptydirs="true">
...
Sure enough, the files to be excluded from delete remain, including their supporting directories. Everything else is deleted.