Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant renaming while copying file

Tags:

ant

How to rename file while copying it to directory in ant?

<copy file="..." todir="..." overwrite="true"> 
like image 370
Martin Avatar asked Jan 23 '12 11:01

Martin


1 Answers

Use tofile option instead of todir


Added

Or a more complex example from Ant Copy Task documentation:

Copy a set of files to a directory, appending .bak to the file name on the fly

  <copy todir="../backup/dir">     <fileset dir="src_dir"/>     <globmapper from="*" to="*.bak"/>  </copy> 
like image 189
helios Avatar answered Oct 07 '22 03:10

helios