ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramarao_4s <>
Subject Need to copy a set of files from a directory tree dynamically
Date Tue, 26 Apr 2011 13:08:03 GMT
Hi All,

I have a requirement where I need to copy a set of files from a directory
tree, can any one help me in resolving this.

My directory structure is
Ant Tesing
+ build(Folder)
+ Main(Folder)  
+ Result(Folder)

Under my Main Folder I have different sub Folders with different names which
in turn contains images folder . so my Main Folder will look like 
+ App1 (Folder)
    + images(Folder)
         + US-pics(Folder) (contains nevada.jpeg file)
         + EU-pics(Folder) (contains norway.jpeg file)
+ App2 (Folder)
   + images (Folder)
       + Asia-pics(Folder)(contains osaka.jpeg file)	
+ App3 (Folder)
   + images(Folder)
         + US-pics(Folder) (contains atlanta.jpeg file)

Now my requirement is i need to copy all these jpeg images from respective
images folder to Images directory under Results my output
directory should look like this.

Results (Folder)
 + Images(Folder)
      + US-pics(Folder) (contain both nevada.jpeg,atlanta.jpeg  file)
      + EU-pics(Folder) (contains norway.jpeg file)
      + Asia-pics(Folder)(contains osaka.jpeg file)

I need to achieve this using ant script i am trying to do this using below
script but couldn't succeed.

<copy todir="${build.home}/images">		 
    <fileset dir="${dynamic.home}" >
		    	<include name="**/**/images/**/*"/>

Please help me in resolving this.

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message