ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Blanc <Sebastien.Bl...@alcatel.com>
Subject Re: list a content of a directory
Date Mon, 05 May 2003 21:17:11 GMT
from Dibi:

I am trying to display a directory content.

Sample Code:


<project name="NATE" default="build" basedir=".">
        <property name="temp_copy" location="\\eappd55\public\gdibi\etc"/>
        <target name="build">
            <copy todir="${temp_copy}/src">
                 <fileset dir="src">
                   <include name="**/*.*"/>
                 </fileset>
            </copy>
            <apply executable="dir">
               <arg value="/w"/>
               <fileset dir="c:\Ant\bin\src">
                 <patternset>
                  <exclude name="**/*.sig"/>
                 </patternset>
               </fileset>
                </apply>
        </target>
        </project>


Traceout:
 [copy] xml\harvest.sig omitted as xml/harvest.sig is up to date.
   [copy] xml\NATE_Reliability_Performance_Analysis_v0.4.0.xsl omitted as
xml/NATE
ability_Performance_Analysis_v0.4.0.xsl is up to date.
  [apply] Current OS is Windows XP
  [apply] Executing 'dir' with arguments:
  [apply] '/w'
  [apply] 'C:\Ant\bin\src\bat\NATE.bat'
  [apply]
  [apply] The ' characters around the executable and arguments are
  [apply] not part of the command.

ILD FAILED
le:C:/Ant/bin/build.xml:9: Execute failed: java.io.IOException:
CreateProcess: dir
:\Ant\bin\src\bat\NATE.bat error=2
      at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:274)
      at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:250)
      at org.apache.tools.ant.Task.perform(Task.java:341)
      at org.apache.tools.ant.Target.execute(Target.java:309)
      at org.apache.tools.ant.Target.performTasks(Target.java:336)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)

"Dibi, George" wrote:

> I am trying to display a directory content. Please see attach for trace out.
> Does any body know what I should do? Thanks
>
> <project name="NATE" default="build" basedir=".">
>         <property name="temp_copy" location="\\eappd55\public\gdibi\etc"/>
>         <target name="build">
>             <copy todir="${temp_copy}/src">
>                  <fileset dir="src">
>                    <include name="**/*.*"/>
>                  </fileset>
>             </copy>
>             <apply executable="dir">
>                <arg value="/w"/>
>                <fileset dir="c:\Ant\bin\src">
>                  <patternset>
>                   <exclude name="**/*.sig"/>
>                  </patternset>
>                </fileset>
>                 </apply>
>         </target>
>         </project>
>
>
> TI- Navigator Deployment
> O. (972) 917-3528
> Email. xf006814@ti.com
>


Mime
View raw message