Differences
This shows you the differences between the selected revisions of the page.
2014-01-03 | 2014-01-03 | ||
extending to .net assembly (martin) | Exclude mask (martin) | ||
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. |
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: | ||
<code winscp> | <code winscp> | ||
- | put -filemask="*/" * | + | put -filemask="|*/" * |
</code> | </code> | ||
Line 12: | Line 12: | ||
<code csharp> | <code csharp> | ||
TransferOptions transferOptions = new TransferOptions(); | TransferOptions transferOptions = new TransferOptions(); | ||
- | transferOptions.FileMask = "*/"; | + | transferOptions.FileMask = "|*/"; |
session.PutFiles(@"d:\toupload\*", "/home/user/", false, transferOptions); | session.PutFiles(@"d:\toupload\*", "/home/user/", false, transferOptions); |