文件路径中的两个星号 [英] Two asterisks in file path

查看:145
本文介绍了文件路径中的两个星号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下文件路径是什么意思?

What does the following file path mean?

$(Services_Jobs_Drop_Path)\**\*.config

该变量仅包含一些路径,没有什么有趣的.我更担心**是什么意思. 有什么想法吗?

The variable just holds some path, nothing interesting. I'm a lot more concerned, what the hell the ** mean. Any ideas?

P.S.如果有帮助,则在msbuild脚本中使用以下路径.

P.S. The following path is used in msbuild scripts, if it helps.

推荐答案

\**\此模式通常用于

\**\ This pattern is often used in Copy Task for recursive folder tree traversal. Basically it means that all files with extension config would be processed from the all subdirectories of $(Services_Jobs_Drop_Path) path.

MSDN,使用通配符指定项:

您可以使用**,*和?通配符指定一组 文件作为构建的输入,而不是分别列出每个文件.

You can use the **, *, and ? wildcard characters to specify a group of files as inputs for a build instead of listing each file separately.

  • 那个?通配符与单个字符匹配.
  • *通配符与零个或多个字符匹配.
  • 通配符**匹配部分路径.
  • The ? wildcard character matches a single character.
  • The * wildcard character matches zero or more characters.
  • The ** wildcard character sequence matches a partial path.

MSDN,使用通配符指定输入

要将所有.jpg文件包括在Images目录和子目录中 使用以下包含属性:

To include all .jpg files in the Images directory and subdirectories Use the following Include attribute:

Include ="Images \ ** \ *.jpg"

Include="Images\**\*.jpg"

这篇关于文件路径中的两个星号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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