You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by thilo boehm <th...@gmail.com> on 2004/08/10 17:10:06 UTC

rename file with mapper

Hello everbody,

I am trying to rename some files with ANT 1.6.1 using the a matcher.

LIVE_filename.txt should be filename.txt

I tried:

  <move todir="${dir}" >
    <fileset dir="${dir}">
      <include name="**/*"/>
    </fileset>
    <mapper type="glob" from="LIVE_*" to="*"/>
  </move>

and 

  <move todir="${dir}" >
    <fileset dir="${dir}">
      <include name="**/*"/>
    </fileset>
    <mapper type="regexp" from="LIVE_(.*)" to="\1" />
  </move>

without luck. Any help is appreciated.
It works, if the pattern is at the end of the filename, but not an the
beginning.

Bye,
  Thilo




-- 
- thilo boehm - www.tboehm.de - thilo/web/gmail -

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org