Wildcards
From Wiki
Wildcard Syntax
?
| Matches any single character. For example, ??? matches "abc" and "123", but not "ab" or "1234".
|
*
| Matches zero or more characters. |
Using Wildcards
| Expression | Matches |
|---|---|
| *.* | All files and folders (same as *) |
| * | All files and folders |
| *. | Files and folders with no extension |
| *.ext | Files and folders that end with ext |
| new* | Files and folders that start with new |
| abc.* | Files and folders named abc with any extension |
| *abc* | Files and folders with abc anywhere in the name |
| a*c | Files and folders that start with a and end with c |
| *.??? | Files and folders with any name and an extension of 3 characters |
| *.?? | Files and folders with any name and an extension of 2 characters |
| *.? | Files and folders with any name and an extension of 1 character |
| ????.* | Files and folders with a name of 4 characters and any extension |
Special Cases
Consecutive * characters are replaced with a single * character.
For example, **** is replaced with *
*.* is replaced with *
For example *.* matches "a.b" and "ab".
multiple variations of this are replaced with a single *
For example **.***.** is replaced with a single *
Expressions ending with *. match a file or folder with no extension.
For example: hosts*. will match hosts
Note: Filenames on NTFS volumes can not have a trailing dot.
