This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff 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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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: 16395
    
  23

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.
 
 
subject: How to go to a partical directory