Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

Copying files in Ant

Thread view: 
JavaEnquirer - 20 Dec 2005 16:52 GMT
I'm trying to copy a list of files from one directory to another. I do
NOT want to use a filter, I want to explicity state in a list the files
to copy. The list should take the form of a comma delimited string. I'd
like to do something like what's shown below ( though, its obviously
not legal ):

<property name="file.list" value = "myjar.jar, myjar2.jar,
myjar9.jar"/>

<copy  todir= "${jar.deploy.dest}">

   <filelist  dir="${central.jar.repository}" files="${file.list}"/>

</copy>   

many thanks in advance.
JavaEnquirer - 20 Dec 2005 18:27 GMT
Answered my own question. Something like this if I remember right:

<property name="file.list" value = "myjar.jar, myjar2.jar,
myjar9.jar"/>

<copy todir="${jar.deploy.dest}">
   <fileset dir="${central.jar.repository}" includes="${file.list}"/>
</copy>
Tajonis - 20 Dec 2005 18:59 GMT
try this so that way a property is not needed

<copy todir="${to.dir}">
      <fileset dir="${from.dir}">
              <include name="*.jar,*.zip">
      </fileset>
</copy>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.