ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thilo boehm <>
Subject Re: rename file with mapper
Date Wed, 11 Aug 2004 14:55:48 GMT
Thanks a lot for your explanation and help. Now the mapper is working
as expected.
Is there any hint in the documentation for this? I couldn't find anything.

- Thilo

On Tue, 10 Aug 2004 22:36:54 +0100, Charles Daniels <> wrote:
> In general, mapper does not work only in the current directory.  It is
> working that way for you because the values you have supplied for the from
> and to attributes (from="LIVE_*" to="*").  The from and to values must take
> into account the entire path of the file (relative to the current
> directory), not just the filename.  Since only the files in the current
> directory have no relative path, those are the only ones renamed with the
> values you are using.
> However, since the glob mapper can only have one wildcard, you cannot
> specify from="*LIVE_*" and to="**", which is what you really want.
> Therefore, you must use the regexp mapper, as you also tried.  Again,
> though, your attempt as using the regexp mapper suffered the same problem --
> you didn't take the relative path into account.  So you need your regexp
> mapper to look like this (not tested):
>  <mapper type="regexp" from="(.*)LIVE_(.*)" to="\1\2" />
> In theory, that should do what you want.  I leave it to you to see if it
> works in practice.

- thilo boehm - - thilo/web/gmail -

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

View raw message