<p>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 seems to be very forgettable in my mind.</p>

<p>Can someone provide a definitive guide to the naming patterns?</p>

[{'answer_id': 70195, 'author': 'Andy Whitfield', 'author_id': 4805, 'author_profile': 'https://Stackoverflow.com/users/4805', 'pm_score': 2, 'selected': False, 'text': '<p>Check out the <a href="http://nant.sourceforge.net/release/latest/help/types/fileset.html" rel="nofollow noreferrer">Nant reference</a>. The fileset patterns are:</p>\n\n<p>\'*\' matches zero or more characters, e.g. *.cs<br>\n\'?\' matches one character, e.g. ?.cs</p>\n\n<p>And \'**\' matches a directory tree e.g. src/**/*.cs will find all cs files in any sub-directory of src.</p>\n'}, {'answer_id': 86915, 'author': 'benzado', 'author_id': 10947, 'author_profile': 'https://Stackoverflow.com/users/10947', 'pm_score': 9, 'selected': True, 'text': "<p>The rules are:</p>\n\n<ul>\n<li>a single star (*) matches zero or more characters <em>within a path name</em></li>\n<li>a double star (**) matches zero or more characters <em>across directory levels</em></li>\n<li>a question mark (?) matches exactly one character within a path name</li>\n</ul>\n\n<p>Another way to think about it is double star (**) matches slash (/) but single star (*) does not.</p>\n\n<p>Let's say you have the files:</p>\n\n<ol>\n<li>bar.txt</li>\n<li>src/bar.c</li>\n<li>src/baz.c</li>\n<li>src/test/bartest.c</li>\n</ol>\n\n<p>Then the patterns:</p>\n\n<ul>\n<li><code>*.c</code> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; matches nothing (there are no .c files in the current directory)</li>\n<li><code>src/*.c</code> &nbsp;&nbsp;&nbsp;&nbsp;matches 2 and 3</li>\n<li><code>*/*.c</code> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches 2 and 3 (because * only matches one level)</li>\n<li><code>**/*.c</code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; matches 2, 3, and 4 (because ** matches any number of levels)</li>\n<li><code>bar.*</code> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;matches 1</li>\n<li><code>**/bar.*</code> &nbsp;&nbsp;matches 1 and 2</li>\n<li><code>**/bar*.*</code> matches 1, 2, and 4</li>\n<li><code>src/ba?.c</code> matches 2 and 3\n&nbsp;&nbsp;&nbsp;</li>\n</ul>\n"}, {'answer_id': 8821223, 'author': 'Aditya Kumar Shrivastava', 'author_id': 948547, 'author_profile': 'https://Stackoverflow.com/users/948547', 'pm_score': 3, 'selected': False, 'text': '<p>Double asterisks (<code>**</code>) are associated with the folder-names matching, whereas single symbols asterisk (<code>* = multi characters</code>) as well as the question-mark (<code>? = single character</code>) are used to match the file-names.</p>\n'}, {'answer_id': 18233215, 'author': 'sparkplug', 'author_id': 1238492, 'author_profile': 'https://Stackoverflow.com/users/1238492', 'pm_score': 4, 'selected': False, 'text': "<p>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:</p>\n<ol>\n<li>bar.txt</li>\n<li>src/bar.c</li>\n<li>src/baz.c</li>\n<li>src/test/bartest.c</li>\n</ol>\n<ul>\n<li><code>src**</code> \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0matches 2, 3 and 4</li>\n<li><code>**.c</code>\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0 matches 2, 3, and 4</li>\n<li><code>**ar.*</code> \xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0\xa0matches 1 and 2</li>\n<li><code>**/bartest.c/**</code> \xa0matches 4</li>\n<li><code>src/ba?.c/**</code> \xa0\xa0\xa0\xa0\xa0\xa0\xa0matches 2 and 3</li>\n</ul>\n"}]
['https://Stackoverflow.com/questions/69835', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4884/']