I have used copydir
to copy the directory. Actually my directory contains some sub-directories, and some of those contain files and others contain sub-directories. How do I copy everything?
Source: Tips4all, CCNA FINAL EXAM
Cisco Certified Network Associate Exam,640-802 CCNA All Answers ~100/100. Daily update
I have used copydir
to copy the directory. Actually my directory contains some sub-directories, and some of those contain files and others contain sub-directories. How do I copy everything?
<copy todir="${dest.dir}" >
ReplyDelete<fileset dir="${src.dir}" includes="**"/>
</copy>
believe that will do what you want...
You should only have to specify the directory (sans the includes property):
ReplyDelete<copy todir="../new/dir">
<fileset dir="src_dir"/>
</copy>
See the manual for more details and examples.
From the example here, you can write a simple Ant file using copy task.
ReplyDelete<project name="MyProject" default="copy" basedir=".">
<target name="copy">
<copy todir="./new/dir">
<fileset dir="src_dir"/>
</copy>
</target>
</project>
This should copy everything inside src_dir (excluding it) to new/dir.
Copy contents including the directory itself.
ReplyDelete<copy todir="${dest.dir}" >
<fileset dir="${src.dir.parent}">
<include name="${src.dir}/**"/>
</fileset>