You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

rename.html 1.5 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="en-us">
  4. <title>Apache Ant User Manual</title>
  5. </head>
  6. <body>
  7. <h2><a name="rename">Rename</a></h2>
  8. <h3><i>Deprecated</i></h3>
  9. <p><i>This task has been deprecated. Use the Move task instead.</i></p>
  10. <h3>Description</h3>
  11. <p>Renames a given file.</p>
  12. <h3>Parameters</h3>
  13. <table border="1" cellpadding="2" cellspacing="0">
  14. <tr>
  15. <td valign="top"><b>Attribute</b></td>
  16. <td valign="top"><b>Description</b></td>
  17. <td align="center" valign="top"><b>Required</b></td>
  18. </tr>
  19. <tr>
  20. <td valign="top">src</td>
  21. <td valign="top">file to rename.</td>
  22. <td valign="top" align="center">Yes</td>
  23. </tr>
  24. <tr>
  25. <td valign="top">dest</td>
  26. <td valign="top">new name of the file.</td>
  27. <td valign="top" align="center">Yes</td>
  28. </tr>
  29. <tr>
  30. <td valign="top">replace</td>
  31. <td valign="top">Enable replacing of existing file (default: on).</td>
  32. <td valign="top" align="center">No</td>
  33. </tr>
  34. </table>
  35. <h3>Examples</h3>
  36. <pre> &lt;rename src=&quot;foo.jar&quot; dest=&quot;${name}-${version}.jar&quot;/&gt;</pre>
  37. <p>Renames the file <code>foo.jar</code> to <code>${name}-${version}.jar</code> (assuming <code>name</code>
  38. and <code>version</code> being predefined properties). If a file named <code>${name}-${version}.jar</code>
  39. already exists, it will be removed prior to renaming <code>foo.jar</code>.</p>
  40. <hr>
  41. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  42. Reserved.</p>
  43. </body>
  44. </html>