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 RE: AW: Copying Folder
Date Mon, 22 Dec 2008 14:45:40 GMT


-----Original Message-----
From: blazingwolf7 [mailto:blazingwolf7@gmail.com]
Sent: Monday, December 22, 2008 10:12 AM
To: user@ant.apache.org
Subject: 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
*/

after reading again, i believe you mean =

a given folderstructure like that =

c:\test>tree /F /A

C:.
|   foo.txt
|   foobar.txt
|   foobaz.txt
|
+---sub
|   \---subsub
|           sub.txt
|
\---sub1
    \---subsub
            sub1.txt
...

and you want to copy only the files on rootlevel
foo.txt
foobar.txt
foobaz.txt

right ??

to achieve that, just use the *.* include pattern
to catch only the files on roolevel =

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


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