Reputation: 5751
I am looping though my folders and need to exclude the svn folders. I thought I could simply add the exclude element, though that doesnt seem to work.
<foreach item="Folder" property="foldername">
<in>
<items>
<include name="YOUR_FOLDER\**" />
<exlcude name="YOUR_FOLDER\**/_svn" />
</items>
</in>
<do>
<foreach item="File" property="filename" in="${foldername}">
<do>
<echo message="${filename}" />
</do>
</foreach>
</do>
</foreach>
Can somebody help?
Upvotes: 1
Views: 5311
Reputation: 9620
You'll want to include the .svn
directories and everything in them as well, otherwise the exclude mask will only hit the .svn
directories, but not .svn/prop-base
, .svn/props
, .svn/text-base
and so on.
<foreach item="Folder" property="foldername">
<in>
<items>
<include name="YOUR_FOLDER/**" />
<exclude name="YOUR_FOLDER/**/.svn/**" />
<exclude name="YOUR_FOLDER/**/_svn/**" />
</items>
</in>
<do>
<foreach item="File" property="filename" in="${foldername}">
<do>
<echo message="${filename}" />
</do>
</foreach>
</do>
</foreach>
Also, are you really using the alternative _svn
naming scheme for Subversion's data directories?
Upvotes: 3
Reputation: 1015
<copy failonerror="true" overwrite="true" todir="${BusinessServicesTarget}">
<fileset basedir="${BusinessServicesPath}">
<exclude name="*.*" />
<include name="/**/*.as?x" />
<exclude name="/**/**_SVN**" />
You need to use it in copy function not in foreach.
Upvotes: 0
Reputation: 5751
It works when adding simply:
<exclude name="YOUR_FOLDER\**_svn**" />
Upvotes: 3