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

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -