I have to admit that I always forgot the syntactical intracacies of the naming patterns for Nant (eg. those used in filesets). The double asterisk/single asterisk stuff seem
Check out the Nant reference. The fileset patterns are:
'*' matches zero or more characters, e.g. *.cs
'?' matches one character, e.g. ?.cs
And '**' matches a directory tree e.g. src/**/*.cs will find all cs files in any sub-directory of src.
The rules are:
Another way to think about it is double star (**) matches slash (/) but single star (*) does not.
Let's say you have the files:
Then the patterns:
*.c
matches nothing (there are no .c files in the current directory)src/*.c
matches 2 and 3*/*.c
matches 2 and 3 (because * only matches one level)**/*.c
matches 2, 3, and 4 (because ** matches any number of levels)bar.*
matches 1**/bar.*
matches 1 and 2**/bar*.*
matches 1, 2, and 4src/ba?.c
matches 2 and 3
Here's a few extra pattern matches which are not so obvious from the documentation. Tested using NAnt for the example files in benzado's answer:
src**
matches 2, 3 and 4**.c
matches 2, 3, and 4**ar.*
matches 1 and 2**/bartest.c/**
matches 4src/ba?.c/**
matches 2 and 3Double asterisks (**
) are associated with the folder-names matching, whereas single symbols asterisk (* = multi characters
) as well as the question-mark (? = single character
) are used to match the file-names.