Patterns

A filename can contain one or more of the following patterns. Note that letters within patterns are case-insensitive:


*

Matches any string, including the null string.


For example, *ab* matches ab, blab, babies, and BABEL.


* matches any string, including TEMP, WINDOWS, makefile, or myfile.c.

? Matches any single character.


For example, ab?c matches any filename that is 4 characters long, begins with ab, and ends with c.

. Remember that ``.'' matches a dot


For example, *.* matches myfile.c, config.sys, and zip.hlp.


*.* does not match TEMP, WINDOWS, or makefile. This is because these names do not contain a dot character.

[...] Matches any one of the enclosed characters.


For example, [ABC]* matches any filename that begins with A, B, or C.

[.-.] Matches any character between the enclosed pair, inclusive (range).


For example, [A-Z]* matches any filename that begins with a letter. [A-LN-Z]* matches any filename that doesn't begin with M.

[!...] Matches any single character except one of those enclosed.


For example, [!XYZ]* matches any filename that does not begin with X, Y, or Z.


Put a backslash before the following characters if they are part of the filename to be matched. This removes their special meaning:

 [ ] { } !



Subsections