Filters

When listing directories or performing one-at-a-time folder transfers, you can limit the results by applying glob-like patterns to each base file name.  The -P or PatternMatch option specifies one or more patterns to apply.

Each pattern will be matched against the base name of local and remote files.  Non-matching files will not be transferred.  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

Wildcards are used to match top-level names on the command line, while PatternMatch filters apply to file names inside listings and folder transfers.