GlobMapper

The GlobMapper works like the copy command in DOS:

<copy todir="/tmp">
  <mapper type="glob" from="*.php" to="*.php.bak"/>

  <fileset refid="someid" />
</copy>

This will change the extension of all files matching the pattern *.php to .php.bak.