File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30913
    
158

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