ANT: Howto process each file in fileset

Discussion in 'Java' started by swebb99@gmail.com, Mar 2, 2006.

  1. Guest

    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
    , Mar 2, 2006
    #1
    1. Advertising

  2. Tony Morris Guest

    wrote:
    > 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

    --
    Tony Morris
    http://tmorris.net/
    Tony Morris, Mar 3, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miguel De Anda

    ant jar/fileset propblems

    Miguel De Anda, Jun 28, 2003, in forum: Java
    Replies:
    1
    Views:
    12,273
    Miguel De Anda
    Jul 3, 2003
  2. Replies:
    2
    Views:
    4,503
    =?UTF-8?B?QXJuZSBWYWpow7hq?=
    Feb 10, 2007
  3. Andrew  McGhie
    Replies:
    3
    Views:
    675
    Roedy Green
    Feb 7, 2008
  4. PerlFAQ Server
    Replies:
    0
    Views:
    119
    PerlFAQ Server
    Jan 26, 2011
  5. PerlFAQ Server

    FAQ 6.14 How do I process each word on each line?

    PerlFAQ Server, Apr 8, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    145
    PerlFAQ Server
    Apr 8, 2011
Loading...

Share This Page