ant contrib - ant iterate inside a folder -


i tried files name of folder using following script

   <target name="test1" depends ="init">        <fileset id="appendjars" dir="${ant.dir}/test">         <include name="*.txt" />     </fileset>     <pathconvert property="files" refid="appendjars" pathsep="," />      <echo message="files: ${files}"  />     <for list="${files}" param="f">          <sequential>         <echo>@{f}</echo>             <antcall target="test2">             <param name="filename"  value="@{f}" />             </antcall>         </sequential>         </for>   </target> 

i files name e:/ant/test/1.txt ... wanna 1.txt how do?

you can use <basename/> task file name. more info can found here.


Comments