ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Delete hidden files probelm
Date Thu, 20 Mar 2008 11:48:21 GMT
 

-----Original Message-----
From: neo anderson [mailto:javadeveloper999@yahoo.co.uk] 
Sent: Thursday, March 20, 2008 12:24 PM
To: user@ant.apache.org
Subject: Delete hidden files probelm

/*
I use the following task to delete hidden files.

	<delete file=".hidden.txt"/>

However, there are many files needed to be removed. If I use

	<delete file=".*.txt"/>

It won't delete hidden files ( but <delete file="*.txt"/> works for
removing
file ext with txt )

What is the correct syntax to remove hidden files using ant tasks?
*/

if you need to delete in root folder only =

<delete>
  <fileset dir="Y:/test" includes=".* *.txt"> 
</fileset>

if you need recursive deletion =

<delete>
  <fileset dir="Y:/test" includes="**/.* **/*.txt"> 
</fileset>

Regards, Gilbert

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


Mime
View raw message