• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant Path problem

 
Li Xin
Ranch Hand
Posts: 37
  • 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
  • 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