<Copy>

The <copy> task enables you to copy files from one destination to another. By default, files that already exist at the destination will be copied only if they are newer than the existing version.

A full listing of <copy> attributes is given in Table 4.22.

Table 4.22. Table of <copy> Attributes
Attributes Description
Required
file (required if fileset elements are not specified) The name of the file to be moved.
tofile (required if file is specified and toDir is not) The destination file.
todir (required if toFile is specified) The destination directory.
Optional
failonerror When a single file is specified, specifies whether to halt the build if the file does not exist. Defaults to true.
Filtering If true, filtering is enabled in the ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.