我正在尝试cmd.exe /C echo Please write this to a file >> output.txt
使用 ant<exec>
任务执行。从命令行执行时,此命令可以正常工作。但是在使用 ant 执行时不起作用。这是我想要做的。
<exec executable="${env.ComSpec}" osfamily="windows">
<arg value="/C"/>
<arg value="echo"/>
<arg value="Please write this to file"/>
<arg value=">>"/>
<arg value="output.txt"/>
</exec>
有人可以告诉我哪里出错了吗?
提前感谢您的投入。