Differences
This shows you the differences between the selected revisions of the page.
2023-05-24 | 2024-10-03 | ||
not recent anymore (martin) | 1 (196.247.224.141) (hidden) (untrusted) | ||
Line 1: | Line 1: | ||
+ | 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 31: | Line 34: | ||
^ 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'' | |
- | | ''<size[KMG]'' | Matches files smaller than ''size''. | ''<1G'' | | + | | ''&lt;size[KMG]'' | Matches files smaller than ''size''. | ''&lt;1G'' | |
- | | ''>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'' | | + | | ''&gt;yyyy-mm-dd[&amp;nbsp;hh:mm[:ss]]'' | Matches files modified the last time after the date or time (i.e. &quot;newer than&quot;). | ''&gt;2012-01-01'' \\ ''&gt;2012-02-29&amp;nbsp;08:47'' | |
- | | ''>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'' | | + | | ''&gt;time[YDHNS][S]'' | Matches files modified the last time within specified interval (i.e. &quot;newer than&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&gt;1Y'' \\ ''&gt;2HS'' \\ ''&gt;yesterday'' | |
- | | ''<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'' | | + | | ''&lt;yyyy-mm-dd[&amp;nbsp;hh:mm[:ss]]'' | Matches files modified the last time before the date or time (i.e. &quot;older than&quot;). | ''*.doc&lt;2012-02-29&amp;nbsp;08:54:21'' | |
- | | ''<time[YDHNS][S]'' | Matches files modified the last time before specified interval (i.e. "older than"). | ''<60D'' | | + | | ''&lt;time[YDHNS][S]'' | Matches files modified the last time before specified interval (i.e. &quot;older than&quot;). | ''&lt;60D'' | |
- | It is also possible to use operators ''>='' and ''%%<=%%''. | + | It is also possible to use operators ''&gt;='' and ''%%&lt;=%%''. |
- | To escape an operator character (''<>''), double it, e.g. ''filewith%%<<%%lessthan''. | + | To escape an operator character (''&lt;&gt;''), double it, e.g. ''filewith%%&lt;&lt;%%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>=2013-01-01<=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&gt;=2013-01-01&lt;=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 93: | Line 96: | ||
===== [[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 |