File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant Path problem

 
Li Xin
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic