Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 5566 invoked by uid 500); 11 Oct 2001 22:26:38 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 5551 invoked from network); 11 Oct 2001 22:26:38 -0000 Reply-To: From: "Murali Vemulapalli" To: Subject: How do I iterate thorugh a directory and subdirectories looking for build.xml scripts and execute them Date: Thu, 11 Oct 2001 15:30:51 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-reply-to: <3BC5E226.EC97AE39@india.hp.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello ! I am building automated test scripts using ANT. I have a directory hierarchy which contains a driver ANT script. In a particular target, I need to look into all the subdirectories looking for build.xml files and run them with default targets. I know how to get all the build.xml scripts, like But how do I iterate through this list getting the directory for each and run ant script there. My target for running build script look like Please note that the ${src.testcase.dir} differs for each testcase and it is the parent directory of the file build.xml I have looked into ForEach custom task floating around the user group. But I wasn't sure how I can use it for this example. Is it for character strings only are for filesets also. How do I use it to get the parent directory for each iterated file. Any suggestions, code examples are greatly appreciated. Thanks a bunch in advance, -- Murali