Cari di Apache Ant 
    Apache Ant User Manual
Daftar Isi
(Sebelumnya) RenameReplace (Berikutnya)
Apache Ant Tasks

RenameExtensions

RenameExtensions

Deprecated

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

Description

Renames files in the srcDir directory ending with thefromExtension string so that they end with thetoExtension string. Files are only replaced ifreplace is true

See the section ondirectory based tasks, on how theinclusion/exclusion of files works, and how to write patterns.This task forms an implicit FileSet andsupports most 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"/>

(Sebelumnya) RenameReplace (Berikutnya)