This task has been deprecated. Use the move task with a glob mapper instead.
Renames files in the srcDir directory ending with the fromExtension string
so that they end with the toExtension string. Files are only replaced
if replace is true
.
See the section on directory based tasks, on
how the inclusion/exclusion of files works, and how to write patterns. This task forms an
implicit FileSet and supports most attributes
of <fileset> (dir becomes srcDir) as well as the
nested <include>, <exclude>
and <patternset> elements.
| Attribute | Description | Required |
|---|---|---|
| defaultexcludes | indicates whether default excludes should be used or not (yes|no). |
No; defaults to yes |
| excludes | comma- or space-separated list of patterns of files that must be excluded. | No; defaults to default excludes or none if defaultexcludes is no |
| excludesfile | name of a file. Each line of this file is taken to be an exclude pattern | No |
| fromExtension | The string that files must end in to be renamed | Yes |
| includes | comma- or space-separated list of patterns of files that must be included. | No; defaults to all (**) |
| includesfile | name of a file. Each line of this file is taken to be an include pattern | No |
| replace | Whether the file being renamed to should be replaced if it already exists | No |
| srcDir | The starting directory for files to search in | Yes |
| toExtension | The string that renamed files will end with on completion | Yes |
<renameext srcDir="/source/project1"
includes="**"
excludes="**/samples/*"
fromExtension=".java.keep"
toExtension=".java"
replace="true"/>