next up previous contents index
Next: Parallel Up: Move Previous: Parameters specified as nested   Contents   Index

Examples

Move a single file (rename a file)

  <move file="file.orig" tofile="file.moved"/>
Move a single file to a directory
  <move file="file.orig" todir="dir/to/move/to"/>
Move a directory to a new directory
  <move todir="new/dir/to/move/to">
    <fileset dir="src/dir"/>
  </move>
Move a set of files to a new directory
  <move todir="some/new/dir">
    <fileset dir="my/src/dir">
      <include name="**/*.jar"/>
      <exclude name="**/ant.jar"/>
    </fileset>
  </move>
Append ".bak" to the names of all files in a directory.
  <move todir="my/src/dir">
    <fileset dir="my/src/dir">
      <exclude name="**/*.bak"/>
    </fileset>
    <mapper type="glob" from="*" to="*.bak"/>
  </move>



Andrew Marlow 2003-07-08