Differences

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

file_mask 2020-03-03 file_mask 2023-05-24 (current)
Line 24: Line 24:
To escape character with special meaning in patterns (''*?['') surround it by set pattern, e.g. ''filewithstar[*]''. To escape character with special meaning in patterns (''*?['') surround it by set pattern, e.g. ''filewithstar[*]''.
 +
 +The file masks are case insensitive.
===== [[size_time]] Size and Time Constraints ===== ===== [[size_time]] Size and Time Constraints =====
Line 71: Line 73:
Directory masks are recursive. E.g. mask ''images/'' matches directories ''/home/martin/images/'' as well as ''/home/martin/images/avatars/''. Directory masks are recursive. E.g. mask ''images/'' matches directories ''/home/martin/images/'' as well as ''/home/martin/images/avatars/''.
-During transfer and [[synchronization]], files and directories are processed recursively. When a directory is excluded, subdirectories and files contained in the excluded directory are not even evaluated against file masks. They are excluded along with its container directory.+During transfer and [[task_synchronize_full|synchronization]], files and directories are processed recursively. When a directory is excluded, subdirectories and files contained in the excluded directory are not even evaluated against file masks. They are excluded along with its container directory.
===== [[path]] Path Mask ===== ===== [[path]] Path Mask =====
Line 79: Line 81:
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/''.
 +
 +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/''.
-The full path mask matches a local or a remote paths only, depending on the syntax used.((Paths starting with drive letter and colon match local paths only. Paths starting with slash match remote path only. Type of slashes does not matter.)) This matters for [[task_synchronize|synchronization]] particularly. For exclude masks, may need to use a separate full path mask for both local and remote path. For include masks, using a full path mask does not make sense with synchronization, as is effectively excludes all files on the other side of the synchronization, breaking it. In general, use partial path masks with the synchronization.+The full path mask matches a local or a remote paths only, depending on the syntax used.((Paths starting with drive letter and colon match local paths only. Paths starting with slash match remote path only. Type of slashes does not matter.)) This matters for [[task_synchronize|synchronization]] particularly. For exclude masks, you may need to use a separate full path mask for both local and remote path. For include masks, using a full path mask does not make sense with synchronization, as it effectively excludes all files on the other side of the synchronization, breaking it. In general, use partial path masks with the synchronization.
===== [[exceptions]] Exceptions ===== ===== [[exceptions]] Exceptions =====
For convenience, mask ''*.*'' is an exception matching any file or directory, even if its name does not include any dot. On the contrary, mask ''*.'' matches any file or directory without an extension. For convenience, mask ''*.*'' is an exception matching any file or directory, even if its name does not include any dot. On the contrary, mask ''*.'' matches any file or directory without an extension.
 +
 +===== [[emptysubfolder]] Subfolders with All Files Excluded =====
 +Excluding all files within a subfolder from transfer or synchronization does not exclude the subfolder itself. As a result an empty subfolder is created in the target. To prevent that, use the [[ui_transfer_custom#other|//Exclude empty directories// transfer setting]]. In [[scripting]] or [[library|.NET assembly]], use the [[rawtransfersettings#excludeemptydirectories|''ExcludeEmptyDirectories'' raw transfer setting]].

Last modified: by martin