tags:

views:

53

answers:

1

Suppose I have a folder with many files. I want to have a .gz version of each file (not a tar.gz with all files). How do I do that with Ant? Ant's doesn't accept a list of files, only operates on one. So how do I repeat this for all files, with a certain extension, in a directory?

+1  A: 

Please take a look at a this question.

louisgab
Hmmm I knew about foreach... it is contrib anyway... I'd like to use a non contrib version. With apply I could do but I need gzip executable. Other ways?
gotch4
You could remove the need for the gzip executable with a rather convulated <apply "ant gzip.xml -Dfilename=" parallel="true"/>. Of course you would need to define gzip.xml's default target as a <gzip> task.
louisgab