This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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


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: 17033
    
  26

Either of these will work:


Or


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


An IDE is no substitute for an Intelligent Developer.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to go to a partical directory
 
It's not a secret anymore!