Filters

The -i or IncludePattern option allows you to limit synchronization to files matching the given patterns.  You may specify multiple patterns in a single option.

Each pattern will be matched against the base name of local and remote files.  Non-matching files will not be copied or deleted.  Filters are only applied to the base names of regular files and symbolic links.  Filters are applied after scanning and will not reduce the time it takes to scan.

Syntax

The IncludePattern takes the form of a semi-colon separated list of glob-like patterns with similar syntax to the Linux fnmatch function.  They work like typical shell globbing, with the following distinctions:

For example, "*.pdf;*.txt;*.doc" will match only files with the extension PDF, TXT, or DOC.

Remember that in most shell environments, the * character must be quoted or escaped on the command line to avoid shell globbing.

See Also

The ExcludePath option has simpler syntax and is applied to the entire relative path of both files and folders.