Differences
This shows you the differences between the selected revisions of the page.
faq_script_non_recursive 2016-01-19 | faq_script_non_recursive 2022-08-09 (current) | ||
Line 1: | Line 1: | ||
====== How do I transfer (or synchronize) directory non-recursively? ====== | ====== How do I transfer (or synchronize) directory non-recursively? ====== | ||
Use [[file_mask#directory|file mask]] ''|*/'' to exclude all (sub-)directories. | Use [[file_mask#directory|file mask]] ''|*/'' to exclude all (sub-)directories. | ||
+ | |||
+ | ===== [[scripting]] Scripting ===== | ||
In [[scripting]], use ''-filemask'' switch of respective command (''[[scriptcommand_get|get]]'', ''[[scriptcommand_put|put]]'' or ''[[scriptcommand_synchronize|synchronize]]'') to set the file mask: | In [[scripting]], use ''-filemask'' switch of respective command (''[[scriptcommand_get|get]]'', ''[[scriptcommand_put|put]]'' or ''[[scriptcommand_synchronize|synchronize]]'') to set the file mask: | ||
Line 7: | Line 9: | ||
put -filemask="|*/" * | put -filemask="|*/" * | ||
</code> | </code> | ||
+ | |||
+ | ===== [[library]] .NET Assembly ===== | ||
With [[library|WinSCP .NET Assembly]], use ''[[library_transferoptions#filemask|TransferOptions.FileMask]]'' property to set the file mask: | With [[library|WinSCP .NET Assembly]], use ''[[library_transferoptions#filemask|TransferOptions.FileMask]]'' property to set the file mask: | ||
Line 16: | Line 20: | ||
session.PutFiles(@"d:\toupload\*", "/home/user/", false, transferOptions); | session.PutFiles(@"d:\toupload\*", "/home/user/", false, transferOptions); | ||
</code> | </code> | ||
+ | |||
+ | ===== GUI ===== | ||
+ | |||
+ | In GUI, specify the ''|*/'' in //File mask// box on [[ui_transfer_custom|Transfer Settings dialog]]. | ||
+ | |||
+ | Though there's actually //Exclude directories// predefined transfer setting preset. | ||