Thank you Jeff. It resolved the issue.
________________________________ From: Jeffrey E Care [mailto:[EMAIL PROTECTED] Sent: Thursday, April 06, 2006 9:56 AM To: Ant Users List Subject: Re: Dynamically increase the number of arguments to EXEC task based on the number and name of the file(s) in a directory. Use the <apply> task. ________________________________________________________________________ ____________________ Jeffrey E. (Jeff) Care [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> IBM WebSphere Application Server Development WAS Pyxis Lead Release Engineer WebSphere Mosiac WebSphere Brandmark "Guttula, Mohan" <[EMAIL PROTECTED]> wrote on 04/06/2006 09:37:01 AM: > Hello All, > > > > Requirement: Dynamically increase the number of arguments to EXEC task > based on the number and name of the file in a directory. > > > > For example a sample directory contains the following files with > extension "*.rod" (Number of rod files in the "src" directory > dynamically change): > > C:\src> dir /b *.rod > > Details.rod > > Info.rod > > Summary.rod > > > > Right now, I'm hard coding the file names in arguments to EXEC task in > the following way > > <target name="erdpro"> > > <condition property="erdpro.client.dir" value="C:\Program > Files\Actuate8\eRDPro\bin" > > > <os family="windows"/> > > </condition> > > > > <echo> Compiling ROD files. Please wait...</echo> > > <exec dir="${erdpro.client.dir}" > executable="${erdpro.client.dir}/erdpro" > > > <arg value="-b"/> > > <arg value=" Details.rod" /> > > <arg value=" Info.rod" /> > > <arg value=" Summary.rod" /> > > </exec> > > </target> > > > > Above target is good when I hardcode the files to the "arg". I want to > dynamically add "arg" values based on the number and name of the file. I > want to know how I can achieve my requirement. (Should I use marcodef? > If so how?) > > > > Any help is highly appreciated. > > > > Thanks, > > Mohan > > > > > > ************************************************************** > This message, including any attachments, contains confidential > information intended for a specific individual and purpose, and is > protected by law. If you are not the intended recipient, please > contact sender immediately by reply e-mail and destroy all copies. > You are hereby notified that any disclosure, copying, or > distribution of this message, or the taking of any action based on > it, is strictly prohibited. > TIAA-CREF > ************************************************************** > ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF **************************************************************