ANT: Howto process each file in fileset

S

swebb99

Hi,

Is it possible to does some processing on each file in a filelist ?

What I want to do is perform checksum on each file in a directory and
compare the results with associated md5 files in another directory (or
do they always have to be in the same directory?). I can't figure out
how I can do this as checksum appears to compare all checksums of all
files in a directory and sets a property based on all files. I want to
process one at a time. I need some way of looping round each file and
basically doing some extra processing of the checksum doesn't match.

Cheers

Steve
 
T

Tony Morris

Hi,

Is it possible to does some processing on each file in a filelist ?

What I want to do is perform checksum on each file in a directory and
compare the results with associated md5 files in another directory (or
do they always have to be in the same directory?). I can't figure out
how I can do this as checksum appears to compare all checksums of all
files in a directory and sets a property based on all files. I want to
process one at a time. I need some way of looping round each file and
basically doing some extra processing of the checksum doesn't match.

Cheers

Steve

It is certainly possible, only that there is not a core task that will
do it. Writing your own Ant task is quite simple.
I wrote one for JTiger - the 2 relevant source files are:
JTigerTask.java http://jtiger.org/test-coverage-report/_files/e.html
Fixtures.java http://jtiger.org/test-coverage-report/_files/d.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top