Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two asterisks in file path

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.

like image 392
Arnthor Avatar asked Dec 16 '11 10:12

Arnthor


People also ask

What does two asterisks mean in file path?

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.

What is a double wildcard?

Double Asterisk ( ** ) matches zero or more characters across multiple segments. It is used for globbing files that are in nested directories.

What does \\ mean in Windows path?

They indicate that the path should be passed to the system with minimal modification, which means that you cannot use forward slashes to represent path separators, or a period to represent the current directory, or double dots to represent the parent directory.

How do you use wildcards in path?

You can use the wildcard (*) sign to indicate a single component between two forward slashes in a base path. Do NOT use wildcards to indicate the following: One or more forward slashes.


1 Answers

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

like image 123
sll Avatar answered Sep 18 '22 07:09

sll