This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 15960
    
  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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to go to a partical directory
 
Similar Threads
ANT Script Example for Websphere Application Server
Which IDE support JSP 2.0
Execute failed: java.io.IOException - error 2
Separating ANT builts (include/exclude specific packages in final built)
how to run other's tomcat from my local system