Example expressions of file inclusions and exclusions
You can enter an expression to specify which files are excluded from the synchronization in either the repository or the work area. For example, if your project contains a project of your own that you compile and the compiled sources and executables are in your own folder called "debug", then using the filter "*\debug" would ensure that the your compiled sources and executables do not get synchronized and avoids the necessity to ignore these files each time a synchronization is run.
You can use the following characters in these expressions:
* | Matches any number of characters. |
? | Matches any single character. |
| | Used to join or concatenate multiple expressions. |
\ | Used as the separator for folders/directories regardless of whether the files are on a Widows or UNIX platform. |
The following table provides examples of expressions.
Expression | Description |
---|---|
build\bar.obj|build\bar.exe
|
Explicitly excludes both bar.obj and bar.exe files in the folder build. |
*.obj|*.exe
|
Excludes all files with .obj and .exe extensions. |
build\*.obj|build\*.exe
|
Excludes files with .obj and .exe extensions in the folder build. |
build\logs
|
Excludes files in the build\logs folder. |