aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes ANT script to iterate on FileNames Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ANT script to iterate on FileNames" Watch "ANT script to iterate on FileNames" New topic
Author

ANT script to iterate on FileNames

P Goel
Greenhorn

Joined: Nov 15, 2008
Posts: 12
Hi,

I'm a new ant user, and i want to iterate over all files present in a directory...
i found that it could be done by using <fileset> but it gives full path of file and i need only name of the files...
please help me out of this prob...

Pulkit
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
135

You could use PropertyRegExp to parse out just the last part.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
P Goel
Greenhorn

Joined: Nov 15, 2008
Posts: 12
Thnx for replying...

it solved my issue...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ANT script to iterate on FileNames
 
Similar Threads
ant build
new to ANT
Ant build - what are 'iterate' and jtp file ?
How to iterate through directory
Setting PATH env value in Ant 1.4.1