aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes How to iterate fileset? 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 "How to iterate fileset?" Watch "How to iterate fileset?" New topic
Author

How to iterate fileset?

Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
We have following Ant code where we are getting <fileset>

<fileset id="id1" dir="D:/SN/two" includes="**/*.java">
<depend targetdir="D:/SN/one"/>
</fileset>

I want to iterate this <fileset>. How to achieve this?


My blood is tested +ve for Java.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

You'll have to provide more information. FileSets are properties of Ant tasks, so it depends on the Ant task you're attempting to execute.


Customer surveys are for companies who didn't pay proper attention to begin with.
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
We are using Depend Selector. Basically it compares files at given two locations and give list of recently modified files as a FileSet.

http://ant.apache.org/manual/CoreTypes/selectors.html#dependselect
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Knock Knock!
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30929
    
158

You could use the ant-contrib for loop task.


[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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to iterate fileset?