Okay, the idea of using a fileset to specify possible matches by pattern is 
right.  All you have to add to that is the use of the resourcecount 
task/condition to count the number of files matched.  If you're using a version 
of Ant earlier than 1.7.0 you can use <pathconvert setonempty="false"> with an 
<isset> condition to determine a fileset's emptiness.

-Matt 

--- On Thu, 10/29/09, cvsusr <sp...@rediffmail.com> wrote:

> From: cvsusr <sp...@rediffmail.com>
> Subject: Alternative for <available> taks to check a pattern of file existence
> To: user@ant.apache.org
> Date: Thursday, October 29, 2009, 6:00 AM
> 
> Hi,
> 
> I need to check for existence of files with some extension
> say *.txt in a
> folder and if present execute a target..
> 
> I found only <available> task which checks for the
> existence of single file
> only when the name of the file known. I wanted to check
> whether *.txt is
> present or not.. if present execute a target..
> 
> Can anyone please help me..
> 
> Thanks in advance.
> 
> 
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Alternative-for-%3Cavailable%3E-taks-to-check-a-pattern-of-file-existence-tp26110901p26110901.html
> Sent from the Ant - Users mailing list archive at
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
> 
> 


      

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

Reply via email to