ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Keller <jkel...@spm.de>
Subject AW: Copying and renaming
Date Mon, 25 Sep 2000 12:49:49 GMT
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