90

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. The following path is used in msbuild scripts, if it helps.

Steve Chambers
  • 37,270
  • 24
  • 156
  • 208
Arnthor
  • 2,563
  • 6
  • 34
  • 54

1 Answers1

122

\**\ 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"

Majix
  • 570
  • 7
  • 14
sll
  • 61,540
  • 22
  • 104
  • 156
  • 1
    Now, that's interesting. Thanks for the answer. – Arnthor Dec 16 '11 at 10:40
  • Where can I get a complete description of all this for both Windows and *nix systems? (e.g. the difference between leaving the front blank vs using "./") – Dois May 29 '15 at 01:27
  • 1
    @Dois, conventions are fairly standard for *nix-style path expansion, though details can differ between different shell environments. If you're using bash, then search for the bash path expansion spec. If you're using zsh or tcsh, then search for those instead. After an hour or so of searching, I can't find much on Windows standards for path expansion other than what's above in this answer. – kdbanman Sep 15 '15 at 16:59