How to rename file while copying it to directory in ant?
<copy file="..." todir="..." overwrite="true">
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With