ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: Rename directories in Ant
Date Wed, 13 Jun 2007 12:50:24 GMT

-----Original Message-----
From: Cesar Martinez Izquierdo [] 
Sent: Wednesday, June 13, 2007 12:57 PM
To: Ant Users List
Subject: Re: Rename directories in Ant

Hi Qazwart, thanks for your reply.
The problem is that I don't want to rename ONE directory, but ALL the
"search" directories in a directory tree.
And the "search" directory may be located inside another "search"
directory, so getting the very first match is not enough... I need all
of them to be replaced...
I guess it needs to be performed using a totally different strategy. Any

maybe something like =

<mapper id="renameMapper" type="glob" from="**\search" to="**\search_"

  <!-- first copy step, all but those search directories -->
  <copy todir="Y:/test_" verbose="true">
    <fileset dir="Y:/test" excludes="**/search/**" />

  <!-- second copy step, copy all search dirs incl. rename to search_
  <copy todir="Y:/test_" verbose="true">
    <fileset dir="Y:/test" includes="**/*" />
    <mapper refid="renameMapper" />

use on your own risk ;-)

i didn't get it how to put those two copy steps in one step only,
but it seems to work anyway !?

Regards, Gilbert

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

View raw message