ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen McConnell" <mcconn...@dpml.net>
Subject RE: copy: "fileset dir" copies only file
Date Sat, 03 Sep 2005 13:37:54 GMT
 

> -----Original Message-----
> From: Mark Wiehland [mailto:Mark.Wiehland@gmx.de] 
> Sent: Saturday, 3 September 2005 9:31 PM
> To: user@ant.apache.org
> Subject: copy: "fileset dir" copies only file
> 
> Hello all,
> 
> I don't get what I do wrong. The manual says:
> 
> Copy a directory to another directory
> 
>   <copy todir="../new/dir">
>     <fileset dir="src_dir"/>
>   </copy>
> 
> Here is my xml code:
> <!-- copy image directory -->
>   <copy todir="${distdir}" verbose="true">
>     <fileset dir="${imagedir}"/>
>   </copy>
> 
> where
> ${distdir} = "./build/dist"
> ${imagedir}= "./resources/img", with a file "testimg.png" inside.
> 
> But Ant just copies "testimg.png" to ./build/dist, not the 
> directory "img". I guess I could just create the directory, 
> but I am really curious what I do wrong. Why doesn't it copy 
> the directory itself?

The following should work...

   <copy todir="${distdir}" verbose="true">
     <fileset dir="${resources}">
       <include name="img/**"/>
     </fileset>
   </copy>

Cheers, Steve.


> Thanks for any help,
> 
> Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message