A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Engineering
»
Ant, Maven and Other Build Tools
Author
Ant Path problem
Li Xin
Ranch Hand
Joined: Feb 06, 2004
Posts: 37
posted
Jul 18, 2004 22:14:00
0
Hi!
Can anybody tell me in
Ant
how to copy file from one drive to another? I tried this in my build file but does not work:
<path id="source.java.dir"><pathelement location="C:\project\src"/></path>
<path id="backup.java.dir"><pathelement location="D:\project\backup"/> </path>
<copy todir="${backup.java.dir}">
<fileset dir="${source.java.dir}" ><include name="*.java"/></fileset>
</copy>
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
posted
Jul 19, 2004 00:59:00
0
I'm not really sure what you mean by "[it] does not work". Perhaps you just need to use slashes instead of backslashes in your paths.
The following example seems to work for me.
<target name="copy"> <copy todir="C:/temp/ant"> <fileset dir="J:/tmp/fubar"/> </copy> </target>
[
How To Ask Good Questions
] [
JavaRanch FAQ Wiki
] [
JavaRanch Radio
]
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Ant Path problem
Similar Threads
Where is documentation for ant task schemaexport
may be some bugs inside schemaexport ?
Ant: earExport is not working with Jdk 1.4
Problem getting log4j.properties picked up when I use security.manager ?
[junit] java.lang.ClassNotFoundException: UserActivityTest
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter