Ant脚本如何为每个文件执行命令

cc9*_*6ai 3 ant

我想为目录中的每个文件使用ant脚本set readonly

exec不允许filelist:

<target name="readonly">
    <exec executable="attrib +r">
        <fileset dir="${reset.root.dir}">
            <include name="**/*" />
        </fileset>      
    </exec>
</target> 
Run Code Online (Sandbox Code Playgroud)

该类型不支持嵌套的"fileset"元素.

Pet*_*ang 9

尝试使用apply任务代替exec,它支持<fileset>.