Move task in Ant is used to move a file or a directory or a set of files to a new directory.
<move file="test.txt" tofile="test_updated.txt" />
<move file="test.txt" todir="/usr/var/move_here/" />
Eg:
<move todir="/usr/var/mover_here/">
<fileset dir="/my/src/dir_to_be_moved">
<include name = **/*.jar >
<exclude name = **/ant.jar">
</fileset>
</move>
A detailed official guide of the Move task and its parameters can be found here.
- Move task can also be used rename a single file (analogous to mv command in unix)
<move file="test.txt" tofile="test_updated.txt" />
- You can use to move a file to a specific directory as follows:
<move file="test.txt" todir="/usr/var/move_here/" />
- Move a set of files to a certain directory
Eg:
<move todir="/usr/var/mover_here/">
<fileset dir="/my/src/dir_to_be_moved">
<include name = **/*.jar >
<exclude name = **/ant.jar">
</fileset>
</move>
A detailed official guide of the Move task and its parameters can be found here.
No comments:
Post a Comment