This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run a batch file

 
Pradeep Kumar
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Can someone help me out with the ant command to run a batch file or an exe command.


Thanks and Regards,
Pradeep Kumar
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://ant.apache.org/faq.html#batch-shell-execute

Note that on older windows system, or non-standard installations, the command might be different from "cmd". Which command shell is used by the windows system by default is recorded in the ComSpec environment variable, so you might want to use that instead of the hardcoded "cmd".
 
Chetan Sachdev
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

That solution worked for me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic