Actually i am using <move>
cmd for renaming one folder instead of <rename>
cmd. but in my case i am moving here 48746 files, so takes 1 approx hour. pls tell me ant appropriate way to rename that folder in optimal way. Thanks in advance.
<target name="rename_folder_jet" depends="Upload_on_ftp">
<move todir="${build.dir}_jet_${ver_number}">
<fileset dir="${build.dir}">
<include name="**/*.*"/>
</fileset>
</move>
</target>
Try to move/rename the directory only, rather than all its contents. Like this:
And make sure that the target directory does not exist before you start.
I experimented with the following build file:
Executing Ant in debug (ant -d) with the above is interesting.
Case 1:
In this case, the target directory of the move/rename does not exist. The debug output of Ant shows:
Case 2:
In this case, the target directory exists already on the second execution. The debug output of Ant shows:
So it seems that if the target directory does not already exist, Ant will do a rename of the directory. But if the target directory exists, it instead does a copy into the directory and delete from the source directory instead.