【问题标题】:How Ant script execute command for each fileAnt 脚本如何为每个文件执行命令
【发布时间】:2010-04-28 14:44:21
【问题描述】:

我想对目录中的每个文件使用 ant 脚本集只读

exec 不允许filelist

<target name="readonly">
    <exec executable="attrib +r">
        <fileset dir="${reset.root.dir}">
            <include name="**/*" />
        </fileset>      
    </exec>
</target> 

该类型不支持 嵌套的“文件集”元素。

【问题讨论】:

    标签: ant


    【解决方案1】:

    尝试使用apply task 代替exec,它支持&lt;fileset&gt;

    【讨论】:

      猜你喜欢
      • 2010-11-30
      • 1970-01-01
      • 1970-01-01
      • 2017-04-03
      • 1970-01-01
      • 1970-01-01
      • 2016-12-08
      • 1970-01-01
      • 2020-08-27
      相关资源
      最近更新 更多