ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject AW: AW: Copying Folder
Date Mon, 22 Dec 2008 09:30:37 GMT
-----Urspr√ľngliche Nachricht-----
Von: blazingwolf7 [mailto:blazingwolf7@gmail.com]
Gesendet: Montag, 22. Dezember 2008 10:12
An: user@ant.apache.org
Betreff: Re: AW: Copying Folder

/*
Not really...I just want to copy the files from the root directory
But the root directory will have folders as well. Now the problem I faced is
how to filter out all the folders so that it only copy the files from the
root directory
*/

you have to use flatten=true for that purpose,
example with attribute flatten =

<project default="copy">
 <target name="copy">
  <copy flatten="true" todir="C:/flatten">
   <fileset dir="C:/groovy" includes="**/*.*" />
  </copy>
</target>
</project>

will do a recursive copy from all files contained in
c:/groovy but doesn't preserve the directory structure,
means the targetdir C:/flatten will have no subfolders.

Regards, Gilbert

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


Mime
View raw message