ant可以替换任务只是在时间戳之后处理文件吗?

时间:2011-10-09 01:21:26

标签: ant replace task

ant替换任务不像具有覆盖属性的复制任务,复制任务可以复制修改时间的文件。

如何在复制任务中更改处理文件的替换任务? 或者在某处保存时间戳,让replace task只处理修改时间在时间​​戳之后的文件。

1 个答案:

答案 0 :(得分:2)

试试这个:

<replace dir="${dir}" value="that" token="this">
   <include name="**/*.txt"/>
   <date datetime="${timestamp}" when="before"/>
</replace>

更多信息:

http://ant.apache.org/manual/Types/fileset.html http://ant.apache.org/manual/Types/selectors.html#dateselect http://ant.apache.org/manual/Tasks/replace.html

相关问题