Differences
This shows you the differences between the selected revisions of the page.
| file_mask 2022-06-16 | file_mask 2026-06-03 (current) | ||
| Line 47: | Line 47: | ||
| ===== [[combining]] Combining Masks ===== | ===== [[combining]] Combining Masks ===== | ||
| - | In most contexts, you can combine several masks using semicolon ('';'') or comma ('',''). You cannot use this in source parameters of [[scripting#commands|script commands]] and .NET assembly methods.((Note that this restriction does not apply to ''-filemask'' switch in scripting and ''[[library_transferoptions#filemask|TransferOptions.FileMask]]'' in .NET assembly.)) | + | In most contexts, you can combine several masks using semicolon ('';'') or comma ('',''). You cannot use this in source parameters of [[scripting#commands|script commands]] and .NET assembly methods.((Note that this ==restriction== does not apply to ''-filemask'' switch in scripting and ''[[library_transferoptions#filemask|TransferOptions.FileMask]]'' in .NET assembly.)) |
| For example following mask includes all JPG and GIF images: ''*.jpg; *.gif''. | For example following mask includes all JPG and GIF images: ''*.jpg; *.gif''. | ||
| Line 54: | Line 54: | ||
| ===== [[include_exclude]] Include and Exclude Masks ===== | ===== [[include_exclude]] Include and Exclude Masks ===== | ||
| - | Mask can combine include and exclude mask separated by pipe (''|''). You cannot use this in source parameters of [[scripting#commands|script commands]] and .NET assembly methods.((Note that this restriction does not apply to ''-filemask'' switch in scripting and ''[[library_transferoptions#filemask|TransferOptions.FileMask]]'' in .NET assembly.)) | + | Mask can combine include and exclude mask separated by pipe (''|''). You cannot use this in source parameters of [[scripting#commands|script commands]] and .NET assembly methods.((Note that this ==restriction== does not apply to ''-filemask'' switch in scripting and ''[[library_transferoptions#filemask|TransferOptions.FileMask]]'' in .NET assembly.)) |
| For example following mask includes all JPG and GIF images, but excludes those starting with ''2010'' and ''2011'': ''*.jpg; *.gif | 2010*; 2011*''. | For example following mask includes all JPG and GIF images, but excludes those starting with ''2010'' and ''2011'': ''*.jpg; *.gif | 2010*; 2011*''. | ||
| Line 80: | Line 80: | ||
| The path mask is matched against full path, i.e. not against path relative path to a root of file transfer or synchronization. E.g. mask ''public_html/wiki/'' does not match ''/home/martinp/public_html/wiki'' directory, even if the root of file transfer or synchronization is ''/home/martinp''. Partial path mask that matches an absolute path may look like ''*/public_html/wiki/''. | The path mask is matched against full path, i.e. not against path relative path to a root of file transfer or synchronization. E.g. mask ''public_html/wiki/'' does not match ''/home/martinp/public_html/wiki'' directory, even if the root of file transfer or synchronization is ''/home/martinp''. Partial path mask that matches an absolute path may look like ''*/public_html/wiki/''. | ||
| - | For a partial path mask it makes no difference whether you use back (''\'') or forward slashes (''/''); the mask will always work for both local and remote paths. For example, a mask ''*/public_html/*.bak'' will match backup files both in ''D:\Documents\public_html\'' and ''/home/martinp/public_html/''. | + | For a partial path mask it makes no difference whether you use back (''\'') or forward ==slashes== (''/''); the mask will always work for both local and remote paths. For example, a mask ''*/public_html/*.bak'' will match backup files both in ''D:\Documents\public_html\'' and ''/home/martinp/public_html/''. |
| - | //In the recent versions//, &recent paths starting with a dot followed by a slash (''./'' or ''.\'') are matched from the root of the operation (such as file transfer or synchronization). For example, when uploading files and folders from local path ''D:\Documents\public_html\'' to remote path ''/home/martinp/public_html/'', mask ''.\data\*.txt'' matches ''*.txt'' files in ''D:\Documents\public_html\data\''. | + | Paths starting with a dot followed by a slash (''./'' or ''.\'') are matched from the root of the operation (such as file transfer or synchronization). For example, when uploading files and folders from local path ''D:\Documents\public_html\'' to remote path ''/home/martinp/public_html/'', mask ''.\data\*.txt'' matches ''*.txt'' files in ''D:\Documents\public_html\data\''. |
| You can also specify full path to a specific file or directory, both local and remote. For example if you want to match only a specific ''.csv'' directory, not all, use ''/home/martinp/data/.csv/'' instead of ''.csv/''. | You can also specify full path to a specific file or directory, both local and remote. For example if you want to match only a specific ''.csv'' directory, not all, use ''/home/martinp/data/.csv/'' instead of ''.csv/''. | ||