文件路径中两个星号在一起是什么意思?

下面的文件路径是什么意思?

$(Services_Jobs_Drop_Path)\**\*.config

变量只是保持一些路径,没什么有趣的。我更关心的是 **到底是什么意思。 有什么想法吗?

下面的路径用于 msbuild 脚本,如果有帮助的话。

45786 次浏览

\**\ 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, Using Wildcards to Specify Items:

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, Specifying Inputs with Wildcards

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

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