I have a TFS MSBuild project from there I am trying to delete directories whose names I would not want to explicitly specify from MSBuild [Since they are many and may change in the future] but want to retain one directory.
In the below example I want to delete all folder under "Web" but want to retain "bin" directory.
-Web
--bin
--folder 1
--folder 2
--folder 3
...
...
<ItemGroup>
<OutputDirs Include="$(DropLocation)\$(BuildNumber)\Web\**\*.*" Exclude="$(DropLocation)\$(BuildNumber)\Web\bin" />
</ItemGroup> <RemoveDir Directories="@(OutputDirs)" />
The above example works for files but not Directories, is there a exclude option I can use without specifying directories that I want to include.
thanks in advance.