Copying files in Ant

J

JavaEnquirer

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.
 
J

JavaEnquirer

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

Tajonis

try this so that way a property is not needed

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top