ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al Le" <Al...@gmx.de>
Subject How to delete all files in a dirset
Date Thu, 20 Oct 2016 10:08:15 GMT
Hello,

I have a dirset defined in my script. How can I delete all files contained in that dirset?

Actually, my goal is to delete the dirs from the dirset, including all the files contained
in them. But since the delete task does not delete non empty dirs, I'd first delete all the
files and, in a second call to 'delete', I'd delete the dirs.

But how can I delete the files?

I.e.

<!-- Define the set of dirs to delete so that id can be referenced by the id -->
<dirset dir="${srcDir}" id="dirs.to.delete">
    <include name="*_to-delete"/>
</dirset>

<!-- Delete all the files contained in 'dirs.to.delete' -->
<delete>
    <!-- What should I specify here? -->
<delete/>

Thanks!
AL

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message