ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Haas <>
Subject [PATCH]: new task: rename a file
Date Tue, 22 Feb 2000 19:15:13 GMT

In our build we need to rename files, so here is the missing rename task
(using Copyfile as template, tnx

<rename src="path/to/old.file" dest="path/to/new.file" replace="yes|no"

The file path/to/old.file is renamed to path/to/new.file.
If src already exists and replace is true, the file is deleted first.
If dst already exists and replace is false, the build halts.

Copyfile does not copy files, if the destination is newer than the
source. I was a little bit surprised of this non obvious implicit
behaviour of Copyfile. I would like to understand the rational behind
the feature and ask, if it can be turned into an option. Of course I
would like to have the feature turned of by default, but I am biased on
this. Copyfile would look like this:

<copyfile src="path/to/old.file" dest="path/to/new.file"
filtering="yes|no" skipnewer="yes|no"  />

- tom

View raw message