Rename

Deprecated

This task has been deprecated. Use the Move task instead.

Description

Renames a given file.

Parameters

Attribute Description Required
src file to rename. Yes
dest new name of the file. Yes
replace Enable replacing of existing file. No; default is on

Examples

Rename the file foo.jar to ${name}-${version}.jar (assuming name and version being predefined properties). If a file named ${name}-${version}.jar already exists, it will be removed prior to renaming foo.jar.

<rename src="foo.jar" dest="${name}-${version}.jar"/>