ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akbar Ibrahim" <akbar.ibra...@wipro.com>
Subject Re: Copying and renaming
Date Mon, 25 Sep 2000 12:15:42 GMT
Thanks. It would solve my problem by I couldn't possibly have files with
names like *_@abc@.txt

Can the filter task be made flexible enough to take a prefix and a suffix to
identify a filter token instead of '@'. Then I could do something like

<filter token="abc" prefix="_" suffix="." value="123" />

And why is the filter on a project wide scope. Should it not be at the scope
of the specific task.

Cheers
Akbar


----- Original Message -----
From: "Javier Keller" <jkeller@spm.de>
To: <ant-user@jakarta.apache.org>
Sent: Monday, September 25, 2000 6:19 PM
Subject: AW: Copying and renaming


You could use filters, for example:

<filter token="abc" value="123" />
<copydir src="${src.dir}" dest="${dest.dir}"/>

will copy recursively all the files from the src.dir directory into the
dest.dir directory replacing all the occurencies of the string @abc@ with
123.

But then your files should be named in the form: *_@abc@.txt...

Hope it helps.



> -----Urspr√ľngliche Nachricht-----
> Von: Akbar Ibrahim [mailto:akbar.ibrahim@wipro.com]
> Gesendet am: Montag, 25. September 2000 12:36
> An: ant-user@jakarta.apache.org
> Betreff: Copying and renaming
>
> Hi,
>
> I would like to copy files and rename them at the same time.
>
> For example, I want to copy all *_abc.txt files (from a src
> directory tree)
> to *_123.txt files (in a dest directory tree). ie
>
> src/f_abc.txt  -> dest/f_123.txt
> src/dir/g_abc.txt -> dest/dir/g_123.txt
> ...
>
> I looked at the copy, copydir and rename tasks but could not
> find out any
> way of doing this.
>
> Is this possible ? I have ant 1.1  (compiled on July 18 2000)
>
> Cheers,
> Akbar
>
>
>
>



Mime
View raw message