除了一个(隐藏的)子目录外,删除目录的全部内容的最佳方法是什么?谢谢!
答案 0 :(得分:4)
<Target Name="DeleteMe">
<ItemGroup>
<DeleteMe
Include="$(PathRoot)/FolderToDelete/**/*.*"
Exclude="$(PathRoot)/FolderToDelete/DoNotDeleteThisHiddenFolder/**/*.*"
/>
</ItemGroup>
<Delete Files="@(DeleteMe)" />
</Target>