First thought was simply adding a <flattenmapper/>, but <apply> adds always the 
basedir. So you 
must also set the 'relative' to true.


Jan

--- build.xml 
--8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
<project>
    <apply executable="cmd.exe" force="true" relative="true">
        <arg line="/C myecho.bat"/>
        <srcfile/>
        <targetfile/>
        <fileset dir="."/>

        <flattenmapper/>

    </apply>
</project>
--- myecho.bat 
--8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
@echo off
echo 1st param: %1
echo 2nd param: %2
echo .
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----
Buildfile: build.xml
    [apply] 1st param: ant1\build.xml
    [apply] 2nd param: build.xml
    [apply] .
    [apply] 1st param: ant2\build.xml
    [apply] 2nd param: build.xml
    [apply] .
    [apply] 1st param: build.xml
    [apply] 2nd param: build.xml
    [apply] .
    [apply] 1st param: dir\ant3\build.xml
    [apply] 2nd param: build.xml
    [apply] .
    [apply] 1st param: dir\ant3\file.txt
    [apply] 2nd param: file.txt
    [apply] .
    [apply] 1st param: dir\ant4\build.xml
    [apply] 2nd param: build.xml
    [apply] .
    [apply] 1st param: files.zip
    [apply] 2nd param: files.zip
    [apply] .
    [apply] 1st param: myecho.bat
    [apply] 2nd param: myecho.bat
    [apply] .
---8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<-------8-<----



 

>-----Ursprüngliche Nachricht-----
>Von: martin sweitzer [mailto:[EMAIL PROTECTED] 
>Gesendet: Dienstag, 25. Oktober 2005 04:20
>An: user@ant.apache.org
>Betreff: using fileset to only list the filenames and not the 
>path+filename
>
>How does one utilize fileset to only list the filenames and not the
>path+filename?
>
>example:
>
><apply dir="aDir" executable="anExe" output="aLog" append="true"
>failonerror="true" >
>
><fileset dir="baz">
><filename name="**/*.foo"/>
></fileset>
>
><srcfile/>
>
><arg value="a bunch of params"/>
>
></apply>
>
>
>That will result in the something like the following:
>
>anExe d:/foo/bar/baz/file0 "a bunch of params"
>anExe d:/foo/bar/baz/file1 "a bunch of params"
>anExe d:/foo/bar/baz/file2 "a bunch of params"
>anExe d:/foo/bar/baz/file3 "a bunch of params"
>anExe d:/foo/bar/baz/file4 "a bunch of params"
>
>
>The output desired would be:
>
>anExe file0 a bunch of params
>anExe file1 a bunch of params
>anExe file2 a bunch of params
>anExe file3 a bunch of params
>anExe file4 a bunch of params
>
>
>So:
>
>0) how to get rid of the full path
>1) how to get rid of the " " around the arg values
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to