Visual Studio Team Services 并使用排除文件夹删除文件(任务构建) [英] Visual Studio Team Services and delete file (task build) with exclude folder

查看:24
本文介绍了Visual Studio Team Services 并使用排除文件夹删除文件(任务构建)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio Team Services 中遇到删除文件任务的问题(以前是 Visual Studio Online、TFS Online):

I am issue with delete-files task in Visual Studio Team Services (was Visual Studio Online, TFS Online):

https://www.visualstudio.com/it-it/docs/build/steps/utility/delete-files

我需要删除除一个文件夹 (App_Data) 之外的所有文件和文件夹(递归).

I need delete all files and folders (recursively) except one folder (App_Data).

我正在尝试:<代码>**!(App_Data*) 或 **!(App_Data)

这种模式几乎有效.只删除 App_Data 中的所有文件.

This pattern almost works. Only delete all files in App_Data.

所以我的问题很简单 - 如何删除除一个之外的所有文件和文件夹的模式?

So my question is simple - How is pattern to delete all files and folders except one?

谢谢

推荐答案

出于某种原因,最初的答案是关于测试模式,而不是删除模式..

对于删除模式,我认为应该如下:

For the delete pattern i think it should be the following:

**;!App_data*

对于第二个@Saad Awan,那将是:

For that second @Saad Awan that would be:

**;!**in*;!**
eport*

这篇关于Visual Studio Team Services 并使用排除文件夹删除文件(任务构建)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆