ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiarna Boyd" <>
Subject foreach directory copy question
Date Thu, 13 Mar 2003 21:22:35 GMT
Good afternoon,

I'm trying to copy the contents of a master directory to several client 
directories as part of my build.
The requirements include not to overwrite some of the existing client build 
sub dirs.

I read the archieves and saw a section on the topic and Simon was kind 
enough to send me some examples using foreach.

However I am having a hard time understanding some of it and would greatly 
appreciate your assistance.

So to begin the masterdir
I also need to know how to change the delimiter in the foreach to new line 
rather than coma. So I may use the out put form unix 'ls'

delimiter=? what is the ant symbol for newline?

I'd like to do the list from a Unix ls cmd to get a current listing of the 
new client directories each time the build is run.

<foreach list="${dev.env}"


  <target name="newversion">
        <echo message="environment: ${thisEnv}"/>
        <copy todir="${builddir}/${thisEnv}">
            <fileset dir="${masterdir}"/>

I believe I have to add a filset exclude for the sub directories I do not 
want copied.

I tried to use wildcards but ant actually made directories named '**'.

Thank you for your time.


Add photos to your messages with MSN 8. Get 2 months FREE*.

View raw message