ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woodchuck <>
Subject RE: <replaceregexp> to wipe out everything in a file
Date Fri, 18 Jun 2004 15:56:33 GMT

my bad.  i didn't mean to mislead anyone.  i said EOF
because from my understanding, it's something all
files have.  i wanted basically 'dummy' files with
nothing at all in them.  the fact that they turned out
to be zero bytes in size was great.

could you show me how you did the <delete> and <touch>

i tried the following but the problem is the fileset
does not retain in its memory the filenames, so after
the <delete> task, all files are gone and <touch> is
working on an 'empty' fileset:

<fileset id="myfiles" dir="${mydir}"/>

<target name="test">
		<fileset refid="myfiles"/>

		<fileset refid="myfiles"/>

if fileset can retain the filenames after <delete>
task then the above would work nicely.  also, Matt, i
tried swapping <echo> with <touch> in the above code
with the following:

<echo message="">
  <fileset refid="myfiles"/>

but unfortunately, <echo> does not support fileset. :(

does your <delete> and <touch> solution turn every
file where they are into empty files (stay in same
physical location/path with name unchanged)?  this is
what i want to do.

--- Matt Benson <> wrote:
> --- Woodchuck <> wrote:
> > see!!  very nice suggestion!!  (i forgot about
> this
> > nice unix command touch...)
> > 
> > let me see if i can apply this <delete> & <touch>
> > strategy to my situation...
> I cooked up one yesterday using <delete> and <touch>
> but let it lie since <replaceregexp flags="s">
> worked.
>  Also, your original post suggested that you did not
> actually want a zero-byte file, but a file
> consisting
> of only the DOS EOF character.  If this is the case,
> just use <fixcrlf fixlast="false" eof="add">.
> -Matt

Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!

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

View raw message