Hello,
I thought I was
following the examples pretty well, but I can't seem to get a small NAnt build
file to enumerate all files in a folder tree *except* ones that have a specific
path element. I have a folder tree that I know has a folder named "_sgbak"
in it and I want the names of all files in the tree *except* for files that have
"_sgbak" somewhere in their path.
Here is a sample
list of files and structure:
X:\Brands\XYZ\Docs\GuiConsole.chm
X:\Brands\XYZ\Docs\GuiConsoleContext.chm
X:\Brands\XYZ\Docs\GuiConsoleMC.chm
X:\Brands\XYZ\Docs\GuiToolConsoleContext.chm
X:\Brands\XYZ\Docs\Provisioning.chm
X:\Brands\XYZ\Docs\Readme.rtf
X:\Brands\XYZ\Docs\WAFS.chm
X:\Brands\XYZ\Installation\Help Files\GuiConsole.chm
X:\Brands\XYZ\Installation\Help Files\GuiConsoleContext.chm
X:\Brands\XYZ\Installation\InstallShield\Script Files\Branding.h
X:\Brands\XYZ\Installation\InstallShield\_sgbak\CaymanISBitmap1.bmp.2006-09-08.11-56-10.7260
X:\Brands\XYZ\Installation\InstallShield\_sgbak\Setup.bmp.2006-09-08.11-56-10.7885
X:\Brands\XYZ\Installation\InstallShield\Branding.xml
X:\Brands\XYZ\Installation\InstallShield\CaymanISBitmap1.bmp
X:\Brands\XYZ\Installation\InstallShield\CaymanISBitmap2.bmp
X:\Brands\XYZ\Installation\InstallShield\license.txt
X:\Brands\XYZ\Installation\InstallShield\Setup.bmp
X:\Brands\XYZ\Docs\GuiConsoleContext.chm
X:\Brands\XYZ\Docs\GuiConsoleMC.chm
X:\Brands\XYZ\Docs\GuiToolConsoleContext.chm
X:\Brands\XYZ\Docs\Provisioning.chm
X:\Brands\XYZ\Docs\Readme.rtf
X:\Brands\XYZ\Docs\WAFS.chm
X:\Brands\XYZ\Installation\Help Files\GuiConsole.chm
X:\Brands\XYZ\Installation\Help Files\GuiConsoleContext.chm
X:\Brands\XYZ\Installation\InstallShield\Script Files\Branding.h
X:\Brands\XYZ\Installation\InstallShield\_sgbak\CaymanISBitmap1.bmp.2006-09-08.11-56-10.7260
X:\Brands\XYZ\Installation\InstallShield\_sgbak\Setup.bmp.2006-09-08.11-56-10.7885
X:\Brands\XYZ\Installation\InstallShield\Branding.xml
X:\Brands\XYZ\Installation\InstallShield\CaymanISBitmap1.bmp
X:\Brands\XYZ\Installation\InstallShield\CaymanISBitmap2.bmp
X:\Brands\XYZ\Installation\InstallShield\license.txt
X:\Brands\XYZ\Installation\InstallShield\Setup.bmp
So I need to get all
files *except* # 11 and 12 above. The examples for <fileset> task
says:
"
so i tried:
**/test/**
Matches all files that have a test
element in their path, including
test
as a filename. "
<items>
<include name="X:\Brands\XYZ\**"/>
<exclude name="**\_sgbak\**"/>
</items>
<include name="X:\Brands\XYZ\**"/>
<exclude name="**\_sgbak\**"/>
</items>
but that still gives
me all the files. What am I doing wrong here?
TIA!
Using: NAnt
0.85 (Build 0.85.2344.0; rc4; 6/2/2006)
Mike Frederick - Software
Developer
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users