ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Wiehland <>
Subject Solved: copy: "fileset dir" copies only file
Date Sat, 03 Sep 2005 12:28:00 GMT
Mark Wiehland wrote:

> 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?

I just found the solution: I have to append "/img" to todir:

<!-- copy image directory -->
  <copy todir="${distdir}/img" verbose="true">
    <fileset dir="${imagedir}"/>

Ant will create the folder then. Still, I think this is not the way it
should be...shouldn't I be able to just copy a directory?



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

View raw message