Differences

This shows you the differences between the selected revisions of the page.

2009-03-05 2009-08-07
bug 328 exclude mask by pipe (martin) split into chapters and reorganize (martin)
Line 8: Line 8:
  * Various [[script commands]].   * Various [[script commands]].
 +===== Filename Mask =====
You can specify several masks separated by semicolon ('';'') or comma ('',''). You can specify several masks separated by semicolon ('';'') or comma ('','').
When specifying the mask you can use following patterns: When specifying the mask you can use following patterns:
Line 21: Line 22:
All other characters are treated literally. All other characters are treated literally.
 +===== Directory Mask =====
 +Particularly when specifying an [[ui_transfer#other_options|include mask]] for transfers, bear in mind that it is applied to directories as well, so that ''*.bak'' will only match backup files located in the current directory (unless you happen to have a subdirectory whose own name ends in ".bak", in which case it will be applied to all backup files in there too).
 +
 +A mask ending with slash matches only directories. The mask ''*/'' matches any directory.
 +
 +For example to transfer only HTML files located in any directory, use the include mask ''*/; *.html''.
 +
 +To make synchronization non-recursive use exclude mask ''*/''.
 +
 +===== Path Mask =====
When the mask selects files and it makes sense to select them based on directory, you can extend the mask with a path mask. You should separate the path mask from the filename mask by a slash. For example mask ''/home/martinp/*.txt'' matches all text files within the directory, but not in subdirectories. To match all text files within subtree, use mask ''/home/martinp/*.txt; /home/martinp/*/*.txt''((Simpler, but less precise, form would be ''/home/martinp*/*.txt'')). When the mask selects files and it makes sense to select them based on directory, you can extend the mask with a path mask. You should separate the path mask from the filename mask by a slash. For example mask ''/home/martinp/*.txt'' matches all text files within the directory, but not in subdirectories. To match all text files within subtree, use mask ''/home/martinp/*.txt; /home/martinp/*/*.txt''((Simpler, but less precise, form would be ''/home/martinp*/*.txt'')).
Line 27: Line 38:
You can also specify full path to specific file or directory, both local and remote. For example if you want to match only specific ''.csv'' directory, not all, use ''/home/martinp/data/.csv/'' instead of ''.csv/''. You can also specify full path to specific file or directory, both local and remote. For example if you want to match only specific ''.csv'' directory, not all, use ''/home/martinp/data/.csv/'' instead of ''.csv/''.
-Particularly when specifying an [[ui_transfer#other_options|include mask]] for transfers, bear in mind that it is applied to directories as well, so that ''*.bak'' will only match backup files located in the current directory (unless you happen to have a subdirectory whose own name ends in ".bak", in which case it will be applied to all backup files in there too). +===== Exceptions =====
- +
-The mask ''*/'' matches any directory. For example to transfer only HTML files located in any directory, use the include mask ''*/; *.html''. +
For convenience, a masks ''*.*'' and ''*.'' are exceptions matching any file and any file without an extension, respectively, even if its name does not include any dot. For convenience, a masks ''*.*'' and ''*.'' are exceptions matching any file and any file without an extension, respectively, even if its name does not include any dot.
 +===== Exclude mask =====
You can add exclude mask by separating it by pipe (''|'') from the include mask. To use exclude mask only, start with pipe straight away. You can add exclude mask by separating it by pipe (''|'') from the include mask. To use exclude mask only, start with pipe straight away.

Last modified: by martin