I have used copydir
to copy a directory tree but it is deprecated. My directory contains some sub-directories, and some of those contain files and others contain more sub-directories.
How can I copy the entire tree?
I have used copydir
to copy a directory tree but it is deprecated. My directory contains some sub-directories, and some of those contain files and others contain more sub-directories.
How can I copy the entire tree?
This code should copy the folder as well as its contents. It also uses the basename task to avoid having to do any manual path parsing.
You should only have to specify the directory (sans the includes property):
See the manual for more details and examples.
Another ant task is Copydir. The key part here is to include the name of the directory you want to copy after the dest directory. The sub-directories and files will be copied automatically.
Copy contents including the directory itself.
Copy contents including the directory itself.
I finally copied using following code
This will copy the src folder from dist to build.
Hope this helps someone.