On Mon, Nov 29, 2010 at 1:22 AM, <jhoomshar...@netscape.net> wrote: > The shell command which I wanted to incorporate on my ANT script is only a > part of lengthy > command in actual I wanted to write the content of a folder in a file with > “/*” suffix and “jobs/” > as prefix to each entry, so say a directory contains following folders > Abc > Def > Ghi > Jkl > Above contents in my txt file should look like this: > Jobs/Abc/* > Jobs/Def/* > Jobs/Ghi/* > Jobs/Jkl/* > And so on
Ah! You should look into "Mappers". A mapper can take a list of file names, and convert them into other names. This can be used as part of the copy process, or in selecting folders for a fileset. Take a look at the <globmapper> at <http://ant.apache.org/manual/Types/mapper.html> and see if that does what you need. You could use the <regexmapper> which allows for more powerful name transformations, but the <globmapper> is easier to use and is good enough for 90% of this type of situations. (And look, there's an example of using a Mapper in a <pathconvert> task!) Using "Mappers" is a bit esoteric and most Ant users aren't experts at them. And, most users would include me personally. I usually have to futz with them for a while to get them to do what I want, and I have to do a lot of heavy referencing with the on line manual. If you play around with "Mappers" enough in order to get them to work, you'll be one of the experts here and can help answer my questions. If you need any help, please feel free to post here, and let us know what you finally were able to do. It'll be a learning experience for all of us on this list. -- David Weintraub qazw...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org