'Ant : get files from sub-folders of a directory

i have a tree like this :

Folder1
   -Sub-folder1
        -file1
        -file2
   -Sub-folder2
        -file3
        -file4
        -...
  -...

I would like to copy all files (without sub-folders) in an other directory. I think about "for loop" but I can't get just files.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source