This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant task to generate a list file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant task to generate a list file" Watch "Ant task to generate a list file" New topic
Author

Ant task to generate a list file

amol skulkarni
Greenhorn

Joined: Dec 11, 2010
Posts: 14
I have a ant task in which I have a property like filelisting whose contents are like a,b,c,d
Now i need to create a txt file like
1a
2b
3c
from the property filelisting
How can be this done with a ant task any ideas?

To make a note here a,b,c,d is obtained from a fileset using pathconvert task of ant and a b c d are file names.
Can there be a way to directly use the fileset to generate above mentioned txt file using ant
I have heard of ant-contrib but not sure if it is the only way to do this.

Thanks in advance
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172
    
    8

Welcome to the Ranch.

We have a dedicated forum for Ant. I will move this post there for you.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

Not directly. You need to write a loop. Ant contrib lets you loop. Or you could write a Java task to do it.


[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: Ant task to generate a list file
 
Similar Threads
ANT classpath
Of paths, patternsets, and filesets
File name
learning Ant
ANT: Regexp with filenames in FileSets