aspose file tools
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
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: 16729
    
  25

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.
 
Don't get me started about those stupid light bulbs.
 
subject: How to go to a partical directory