ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Matèrne (jhm) <apa...@materne.de>
Subject AW: How to delete all files in a dirset
Date Thu, 20 Oct 2016 10:56:38 GMT
Could you use a <fileset>?

Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Al Le [mailto:Al.Le@gmx.de]
> Gesendet: Donnerstag, 20. Oktober 2016 12:08
> An: user@ant.apache.org
> Betreff: How to delete all files in a dirset
> 
> 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



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


Mime
View raw message