bat批处理ant执行完毕后执行其他命令

来源:互联网 发布:unity3d 第一视角 编辑:程序博客网 时间:2024/05/22 03:01

    一个bat批处理文件中,执行ant命令完毕后,其他命令或其他ant脚本不执行的问题,可以通过call命令解决。call命令说明如下:

-----------------------------------------------------------------------------------------------

Syntax
      CALL [drive:][path]filename [parameters]
      CALL :label [parameters]
      CALL internal_cmd
Key:
   pathname     The batch program to run.
   parameters   Any command-line arguments.
   :label       Jump to a label in the current batch script.
   internal_cmd Run an internal command, first expanding any variables in the argument.

-------------------------------------------------------------------------------------------------

    根据上面call命令解释的,编写一个ant的bat脚本(ant_build.bat),然后再编写一个ant之后需要执行的bat脚本(createZip.bat),通过call进行处理:

call ant_build.batcall createZip.batpause
执行效果如下:


0 0
原创粉丝点击