You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by neo anderson <ja...@yahoo.co.uk> on 2008/03/20 12:23:38 UTC

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?

Thanks in advice,
-- 
View this message in context: http://www.nabble.com/Delete-hidden-files-probelm-tp16176709p16176709.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: Delete hidden files probelm

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.
 

-----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


Re: Delete hidden files probelm

Posted by Matt Benson <gu...@yahoo.com>.
Is it possible you're running afoul of "default
excludes"?

see
http://ant.apache.org/manual/dirtasks.html#defaultexcludes

HTH,
Matt

--- neo anderson <ja...@yahoo.co.uk> wrote:

> 
> 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?
> 
> Thanks in advice,
> -- 
> View this message in context:
>
http://www.nabble.com/Delete-hidden-files-probelm-tp16176709p16176709.html
> Sent from the Ant - Users mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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