调用内部恶性批处理文件 [英] calling batch files inside nant

查看:151
本文介绍了调用内部恶性批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能叫楠脚本中的批处理文件? (也许有调用批处理文件的目标)。

How can I call a batch file inside a nant script??? (Maybe having a target that calls the batch file).

推荐答案

这是pretty简单,其实 - 我会尽力来说明:

That's pretty easy, actually - i'll try to illustrate:

 <target name="run-command">
   <exec program="ConsoleTest.exe" basedir="${test.dir}">
     <arg value="-cp" />
   </exec>
 </target>

该BASEDIR是可选的,它指定在哪里运行该程序。但是,如果你的程序是在路径上(如ping),你可能不必担心。

The basedir is optional, it specifies where to run the program from. But if your program is on the path (like ping), you probably don't have to worry about it.

有一个看官方文档还有:)

这篇关于调用内部恶性批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆