ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Powe <>
Subject Re: how to detect a file while looping thru a list of directories
Date Thu, 04 Mar 2010 11:09:41 GMT
On Wed, Mar 03, 2010 at 05:08:06PM -0800, Andy2008 wrote:
> I want to loop thru a list of directories and only call a target called "ABC"
> if a directory contains a "test.xml" file.  below is my initial code
> <foreach target="ABC" param="ABCParam">
>     	<path>
>       		<dirset dir="c:\temp"/>
>       	</path>
> </foreach>
> Do you have any ideas?


<project default="main">
  <target name="main" depends="check" if="ok">
	  it works.
  <target name="check">
	<condition property="ok">
		<available file="test.xml" filepath="/home/powem/src/php"/>
		<available file="test.xml" filepath="/home/powem/src/java"/>



Michael Powe		Naugatuck CT USA

 If you can't learn to do it well, learn to enjoy doing it badly.

View raw message