ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Mike Castle)
Subject Re: xargs task?
Date Mon, 25 Aug 2003 17:05:53 GMT
In article <>,
Jason Varsoke  <> wrote:
>Specifically I'd like to pass <delete> a filename that contains a list
>of \n seperated files to be deleted.  Same as:
>$ cat files.txt | xargs rm

<foreach/> task from ant-contrib.

Something like:

<loadfile property="" srcFile="delete.list">
<delete verbose="true">
   <fileset dir="." includes="${file.list}"/>

Then, in your delete.list, add an extra space at the end of each line, so
your input file, which looks like this:

will end up as a property looking like:
a/b b/c

Of course, this only works on files relative to basedir.  Can't do
something like:

Such is the power and flexibility of ant.

     Mike Castle
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message