I have a folder structure like
ant/
test1/
images/
1.png ...
test2/
images/
121.png ...
test3/
images/
173.gif ...
I want to read all the images from different different images folders and put them into one image folder under the ant folder.
I have written this code
<project name = "java-ant project" default = "copy-file">
<target name="copy-file">
<copy todir="D:/ant/images">
<fileset includes="**/images/" dir="D:/ant/"/></copy>
</target>
</project>
This copies successfully into the images folder, but keeps the source folder structure.
Like:
ant/
images/
test1/
images/
1.jpg ...
test2/
images/
121.jpg ...
My desired output is:
ant/
images/
1.jpg
121.png
173.gif
...