This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes How to go to a partical directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "How to go to a partical directory" Watch "How to go to a partical directory" New topic
Author

How to go to a partical directory

Pradeep Kumar
Ranch Hand

Joined: Sep 11, 2007
Posts: 77
Is there a way in ant to choose the absolute path. Can i know the format please. For ex. if my batch file is in c:\someFolder\bin\someBat.bat.
<target name="exec">
<exec dir="." executable="cmd" os="Windows NT">
<arg line="/c hcmdssrv.bat"/>
</exec>
</target>

What should be my attribute value for <exec dir = ".">How to point it to someBat.bat in c:\someFolder\bin.

Thanks and regards,
Pradeep Kumar


SCJP 1.6
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Either of these will work:


Or


I recommend the second version, since backslashes have alternative meanings to Java.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to go to a partical directory
 
Similar Threads
ANT Script Example for Websphere Application Server
Execute failed: java.io.IOException - error 2
Which IDE support JSP 2.0
Separating ANT builts (include/exclude specific packages in final built)
how to run other's tomcat from my local system