FindUnder exclude folder / path

Jun 1, 2012 at 9:14 AM
Edited Jun 1, 2012 at 9:15 AM

Hello

I am using FindUnder to search for bin + obj folders to delete them.

 

        <MSBuild.ExtensionPack.FileSystem.FindUnder TaskAction="FindDirectories" Path="..\" SearchPattern="bin">
            <Output ItemName="AllBinDirectories" TaskParameter="FoundItems"/>
        </MSBuild.ExtensionPack.FileSystem.FindUnder>
    <RemoveDir Directories="@(AllBinDirectories)" />

My directory structure:
Test\build
Test\Project1
Test\Project2
Test\Projekt3

I am running the msbuild Project in the Test\build folder an like to delete bin folders only in the Project folders.
Is there a possibility to exclude the build folder? If there is a bin folder it should not be deleted.

Thanks Martin