ant-user mailing list archives

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


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"> 
         <fileset dir="C:/Temp" casesensitive="no" />

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

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:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message