Differences
This shows you the differences between the selected revisions of the page.
file_mask 2024-11-24 | file_mask 2024-11-24 (current) | ||
Line 1: | Line 1: | ||
- | 317 | ||
- | |||
- | |||
- | 317 | ||
- | |||
- | |||
====== Masks ====== | ====== Masks ====== | ||
To use the following features of WinSCP you need to specify a mask (wildcard) to select files (or other things): | To use the following features of WinSCP you need to specify a mask (wildcard) to select files (or other things): | ||
Line 37: | Line 31: | ||
^ Pattern ^ Meaning ^ Example ^ | ^ Pattern ^ Meaning ^ Example ^ | ||
- | | ''>size[KMG]'' | Matches files larger than ''size''. \\ Note that directories are considered to have a zero size. \\ Following units can be used: ''K'' (Kilobyte), ''M'' (Megabyte) or ''G'' (Gigabyte). | ''*.bin>1M'' | | + | | ''>size[KMG]'' | Matches files larger than ''size''. \\ Note that directories are considered to have a zero size. \\ Following units can be used: ''K'' (Kilobyte), ''M'' (Megabyte) or ''G'' (Gigabyte). | ''*.bin>1M'' | |
- | | ''&amp;lt;size[KMG]'' | Matches files smaller than ''size''. | ''&amp;lt;1G'' | | + | | ''<size[KMG]'' | Matches files smaller than ''size''. | ''<1G'' | |
- | | ''&amp;gt;yyyy-mm-dd[&amp;amp;nbsp;hh:mm[:ss]]'' | Matches files modified the last time after the date or time (i.e. &amp;quot;newer than&amp;quot;). | ''&amp;gt;2012-01-01'' \\ ''&amp;gt;2012-02-29&amp;amp;nbsp;08:47'' | | + | | ''>yyyy-mm-dd[ hh:mm[:ss]]'' | Matches files modified the last time after the date or time (i.e. "newer than"). | ''>2012-01-01'' \\ ''>2012-02-29 08:47'' | |
- | | ''&amp;gt;time[YDHNS][S]'' | Matches files modified the last time within specified interval (i.e. &amp;quot;newer than&amp;quot;). \\ Cannot be used for directories. \\ One of the following units must be used: ''Y'' (years), ''D'' (days), ''H'' (hours), ''N'' (minutes) or ''S'' (seconds). \\ Optional ''S'' suffix denotes rounding the time before the interval to the start of the interval unit. For example, ''2DS'' refers to the start (midnight) of the day before yesterday. ''0HS'' refers to the start of the current hour. Keywords ''==today=='' and ''==yesterday=='' can be used instead of ''0DS'' and ''1DS'', respectively. | ''*.doc&amp;gt;1Y'' \\ ''&amp;gt;2HS'' \\ ''&amp;gt;yesterday'' | | + | | ''>time[YDHNS][S]'' | Matches files modified the last time within specified interval (i.e. "newer than"). \\ Cannot be used for directories. \\ One of the following units must be used: ''Y'' (years), ''D'' (days), ''H'' (hours), ''N'' (minutes) or ''S'' (seconds). \\ Optional ''S'' suffix denotes rounding the time before the interval to the start of the interval unit. For example, ''2DS'' refers to the start (midnight) of the day before yesterday. ''0HS'' refers to the start of the current hour. Keywords ''==today=='' and ''==yesterday=='' can be used instead of ''0DS'' and ''1DS'', respectively. | ''*.doc>1Y'' \\ ''>2HS'' \\ ''>yesterday'' | |
- | | ''&amp;lt;yyyy-mm-dd[&amp;amp;nbsp;hh:mm[:ss]]'' | Matches files modified the last time before the date or time (i.e. &amp;quot;older than&amp;quot;). | ''*.doc&amp;lt;2012-02-29&amp;amp;nbsp;08:54:21'' | | + | | ''<yyyy-mm-dd[ hh:mm[:ss]]'' | Matches files modified the last time before the date or time (i.e. "older than"). | ''*.doc<2012-02-29 08:54:21'' | |
- | | ''&amp;lt;time[YDHNS][S]'' | Matches files modified the last time before specified interval (i.e. &amp;quot;older than&amp;quot;). | ''&amp;lt;60D'' | | + | | ''<time[YDHNS][S]'' | Matches files modified the last time before specified interval (i.e. "older than"). | ''<60D'' | |
- | It is also possible to use operators ''&amp;gt;='' and ''%%&amp;lt;=%%''. | + | It is also possible to use operators ''>='' and ''%%<=%%''. |
- | To escape an operator character (''&amp;lt;&amp;gt;''), double it, e.g. ''filewith%%&amp;lt;&amp;lt;%%lessthan''. | + | To escape an operator character (''<>''), double it, e.g. ''filewith%%<<%%lessthan''. |
- | To combine constraints, append one after another, without any separators (or use spaces). E.g. to select all ''.doc'' files created in 2013: ''%%*.doc&amp;gt;=2013-01-01&amp;lt;=2013-12-31%%''. | + | To combine constraints, append one after another, without any separators (or use spaces). E.g. to select all ''.doc'' files created in 2013: ''%%*.doc>=2013-01-01<=2013-12-31%%''. |
Note that if your constraint contains spaces (particularly constraint with date and time), to use it in [[scripting]], you need to enclose whole mask to double-quotes. | Note that if your constraint contains spaces (particularly constraint with date and time), to use it in [[scripting]], you need to enclose whole mask to double-quotes. | ||
Line 99: | Line 93: | ||
===== [[emptysubfolder]] Subfolders with All Files Excluded ===== | ===== [[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]]. | 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]]. | ||
- | |||
- | 1 | ||
- | |||
- | 1 |