In Ant, copy all files from a tree of folders into a single folder?

Posted by Sam Washburn on Stack Overflow See other posts from Stack Overflow or by Sam Washburn
Published on 2010-06-03T01:37:56Z Indexed on 2010/06/03 1:44 UTC
Read the original article Hit count: 251

Filed under:
|
|

Is it possible to use Ant to copy all the files (not folders) from a hierarchy of folders into one destination folder?

For instance, I have a tree like this:

res
|-images
|  |-fg.png
|  +-bg.png
+-sounds
   +-music.mp3

And I would like a result like this:

data
|-fg.png
|-bg.png
+-music.mp3

The way things are named, filename conflicts are not an issue.

Is this possible to do with Ant?

© Stack Overflow or respective owner

Related posts about ant

Related posts about copy