【问题标题】:How to iterate a list of files and apply a command on each?如何迭代文件列表并在每个文件上应用命令?
【发布时间】:2011-04-01 02:55:32
【问题描述】:

我有一个文件夹,里面有两个文件(a.exe 和 b.exe),我需要对每个文件运行一个命令。例如xxx - a.exe a.bin。有没有办法用 Ant 做到这一点?

我想让蚂蚁跑:

xxx - a.exe a.bin

xxx - b.exe b.bin

【问题讨论】:

    标签: ant command iteration


    【解决方案1】:

    使用<apply>。阅读更多关于它的信息here

    【讨论】:

      【解决方案2】:

      <foreach> 与嵌套的<FileSet> 一起使用。

      更多信息here

      【讨论】:

        猜你喜欢
        • 2018-04-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-07-08
        • 1970-01-01
        相关资源
        最近更新 更多