## RenameExtensions

### Deprecated

This task has been deprecated. Use the move task with a glob mapper instead.

### Description

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 all attributes of `<fileset>` (`dir` becomes `srcDir`) as well as the nested `<include>`, `<exclude>` and `<patternset>` elements.

### Parameters

Attribute | Description | Required
defaultexcludes | indicates whether default excludes should be used or not ("yes"/"no"). Default excludes are used when omitted. | No
excludes | comma- or space-separated list of patterns of files that must be excluded. No files (except default excludes) are excluded when omitted. | No
excludesfile | the name of a file. Each line of this file is taken to be an exclude pattern | No
fromExtention | 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. All files are included when omitted. | No
includesfile | the 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

### Examples

> `<renameext srcDir="/source/project1" includes="**" excludes="**/samples/*" fromExtension=".java.keep" toExtension=".java" replace="true"/>`

Copyright © 2000-2002,2004 The Apache Software Foundation. All rights Reserved.