Differences
This shows you the differences between the selected revisions of the page.
file_mask 2023-02-11 | file_mask 2024-11-24 (current) | ||
Line 56: | Line 56: | ||
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*''. |
Both include and exclude part can be empty, denoting that everything is included or nothing is excluded, respectively. When include part is empty, masks starts with pipe straight away. When exclude part is empty, you can omit the trailing pipe. | Both include and exclude part can be empty, denoting that everything is included or nothing is excluded, respectively. When include part is empty, masks starts with pipe straight away. When exclude part is empty, you can omit the trailing pipe. | ||
Line 82: | Line 82: | ||
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/''. |