<?xml version="1.0" ?> <project name="antCopy" default="target1" basedir="../"> <target name="target1"> <move file="E:/workspace/AntDemo/ant/test/mkdirtest/log.txt" tofile="E:/workspace/AntDemo/ant/test/test02/movedest.txt" /> <move file="E:/workspace/AntDemo/ant/test/mkdirtest/hehe.txt" todir="E:/workspace/AntDemo/ant/test/test02" /> </target> </project>
<!--
move 命令
移动文件或目录,举例如下:
eg1. 移动单个文件:
<move file="sourcefile" tofile=”destfile”/>
eg2. 移动单个文件到另一个目录:
<move file="sourcefile" todir=”movedir”/>
eg3. 移动某个目录到另一个目录:
<move todir="newdir"> <fileset dir="olddir"/></move>
-->