• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing current directory to Ant script located elsewhere

 
steve claflin
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an ant script, located in a fixed location that includes a Java class that it runs. I want the Java class to process files in whatever directory I launched ant from (I provide the path to build.xml when I launch it). It seems that the ant's concept of "." is the location of build.xml, so what captures the knowledge of where the command prompt is? (like that ~dp0 thing in a cmd file ...)
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try ${user.dir}
 
steve claflin
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Works like a charm - thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic