Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

.bat Executed Direct from exec  RSS feed

 
Chris Bohannon
Greenhorn
Posts: 8
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have an Ant related question. According to the Ant manual:

Note that .bat files cannot in general by executed directly. One normally needs to execute the command shell executable cmd using the /c switch.


Here is a code snippet:


This seems to work just fine. I am executing a .bat file directly from the exec task. Now the manual states "general" usage, but I am wondering if I should use the recommend method or is it safe to do what I am doing?

Thanks!
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That might be really old text because if I recall correctly that was a problem many years ago. If it is working for you, go for it.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!