ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: Directory list for FOR-EACH Task
Date Thu, 02 Oct 2003 17:29:46 GMT
You can use the path element of foreach:

  <target name="callee">
    <echo>${dir.name}</echo>
  </target>
  
  <target name="call">
    <ac:foreach target="callee" param="dir.name">
      <path>
        <dirset dir="${basedir}/.." includes="*"/>
      </path>
    </ac:foreach>

Peter
On Thursday 02 October 2003 18:20, Vikas Phonsa wrote:
> I'm using the following target to display a list of directories in a root
> directory.  It prints out the absolute path of each directory
>
>
> <target name="test"/>
>  <dirset id="fs" dir="${basedir}/../../" includes="*"/>
>    <pathconvert property="fs.value" refid="fs"
> pathsep="${line.separator}"/> <echo>${fs.value}</echo>
> </target>
>
>
> How can I supply the path of each directory to a foreach task of
> ant-contrib.
>
> Also can I extract just the names of the directories from the absolute
> paths Generated by the above target.
>
> Please guide.
>
> Thanks
>
> Vikas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message