This is an old revision of the document!
Masks
To use some features of WinSCP you need to specify mask to select files (or other things). Such features are:
- Text file mask for text mode transfers.
- Ignore mask for transfers.
- Selecting/unselecting files by file mask.
Advertisement
You can specify several masks separated by semicolon (;
).
When specifing the file mask you can use following patterns:
Pattern | Meaning | Example |
---|---|---|
* |
Matches any number (including zero) of arbitrary characters. | *.doc; about*.html |
? |
Matches exactly one arbitrary character. | photo????.jpg |
[abc] |
Matches one character from the set. | index_[abc].html |
[a-z] |
Matches one character from the range. | index_[a-z].html |
All other characters are treated literally.
When the mask selects files and it makes sense to select them based on directory, you can extend the mask with path mask. Separate path mask from filename mask by slash. For relative path mask it does not make difference if you use back (\
) or forward slashs (/
), the mask will always work for both local and remote paths. For example exclude mask */public_html/*.bak
will exclude backup files both in D:\Documents\public_html
and /home/martinp/public_html
.
Particularly when specifing include mask for transfers, keep in mind that it is applied to directories as well.