ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thilo boehm <thilo.bo...@gmail.com>
Subject rename file with mapper
Date Tue, 10 Aug 2004 15:10:06 GMT
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


Mime
View raw message