How Ant script to execute a command for each file

I would like to use ant script to set readonly for every file in the directory

but execdoes not allow filelist:

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

The type does not support the file set nested element.

+3
source share
1 answer

Try using applytask instead exec, it supports <fileset>.

+9
source

Source: https://habr.com/ru/post/1743196/


All Articles