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-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to