简体   繁体   中英

How to rename n files with ANT? (Batch Job)

How can I rename 1..n file with ANT? I would like to rename any files with xxxx.default.properties to xxxx.local.properties .

Thank you.

Using the move task you could do something like this:

  <move todir="my/src/dir" includeemptydirs="false">
    <fileset dir="my/src/dir"/>
    <mapper type="glob" from="*.default.properties" to="*.local.properties"/>
  </move>

Give it a try and let us know.

Use the move -task . There is also an example how to rename a set of files (last examples).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM