ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nisse <nisse...@home.se>
Subject Using foreach
Date Wed, 24 Jun 2009 07:21:27 GMT

Hi

I'm trying get all files from a directory and print it to the screen. And I
only want to print the name of the file, not with the path and filename. My
code looks like this:

<target name="start">
   <foreach target="printOut" param="Files"> 
      <path> 
         <fileset dir="C:/Temp" casesensitive="no" />
      </path>
   </foreach>
</target>

<target name="printOut">
   <echo message="${Files}"/>
</target>


This code prints for example "C:/Temp/MyFile.txt"
But I only want it to print "MyFile.txt", how do I do that in a simple way??

Very grateful for any help!
-- 
View this message in context: http://www.nabble.com/Using-foreach-tp24179911p24179911.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message