Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant task to generate a list file

 
amol skulkarni
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

We have a dedicated forum for Ant. I will move this post there for you.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not directly. You need to write a loop. Ant contrib lets you loop. Or you could write a Java task to do it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic