NAnt include/exclude pattern to include root bin folder but not child bin folders -
how can craft nant include/exclude pattern include root /bin directory , files, exclude bin directories children of other directories?
<target name="createartifacts"> <copy todir="${destdir}" includeemptydirs="false"> <fileset basedir="${sourcedir}"> <include name="**" /> <!-- root \bin folder --> <exclude name="**\bin\*.pdb" /> <exclude name="**\bin\*.xml" /> ... </fileset> </copy> </target>
i want exclude bin folder not root bind folder:
<exclude name="\**\bin\" />
but ends removing root bin well.
you have been close answer. should add asterisk first character in exclude
pattern. taking sample, loot this:
<target name="createartifacts"> <copy todir="${destdir}" includeemptydirs="false"> <fileset basedir="${sourcedir}"> <include name="**" /> <exclude name="*\**\bin\*.pdb" /> <exclude name="*\**\bin\*.xml" /> ... </fileset> </copy> </target>
that first asterisk means "we don't want take first-level folder consideration".
Comments
Post a Comment