Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Ant script execute command for each file

Tags:

ant

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

but exec doesn't allow filelist:

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

The type doesn't support the nested "fileset" element.

like image 422
cc96ai Avatar asked Dec 04 '25 21:12

cc96ai


1 Answers

Try using the apply task instead of exec, it supports <fileset>.

like image 52
Peter Lang Avatar answered Dec 07 '25 11:12

Peter Lang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!