|
MoveDescriptionMoves a file to a new file or directory, or sets of files to a new directory. By default, the destination file is overwritten if it already exists. When overwrite is turned off, then files are only moved if the source file is newer than the destination file, or when the destination file does not exist. FileSets are used to select sets of files to move to the todir directory. Parameters
Parameters specified as nested elementsmapperYou can define file name transformations by using a nested mapper element. The default mapper used by
filterchainThe Move task supports nested FilterChains. If <filterset> and <filterchain> elements are used inside the same <move> task, all <filterchain> elements are processed first followed by <filterset> elements. ExamplesMove 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 <move todir="my/src/dir"> <fileset dir="my/src/dir"> <exclude name="**/*.bak"/> </fileset> <mapper type="glob" from="*" to="*.bak"/> </move> Copyright © 2000-2002 Apache Software Foundation. All rights Reserved. |