In article <[EMAIL PROTECTED]>,
Jason Varsoke <[EMAIL PROTECTED]> 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="list.of.files.to.delete" srcFile="delete.list">
<filterchain>
<striplinebreaks/>
</filterchain>
</loadfile>
<delete verbose="true">
<fileset dir="." includes="${file.list}"/>
</delete>
Then, in your delete.list, add an extra space at the end of each line, so
your input file, which looks like this:
a/b
b/c
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:
a/b
/tmp/foo
b/c
Such is the power and flexibility of ant.
mrc
--
Mike Castle [EMAIL PROTECTED] www.netcom.com/~dalgoda/
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]