Avoid downloading subfolders with WinSCP

孤街醉人 提交于 2019-12-08 03:17:11

问题


I am using the below script

option batch abort
option confirm off
open sftp:-------
get -filemask=">=%TIMESTAMP#yyyy-mm-dd%" /outbound \\sharedrive\Copiedfiles
exit

Please let me know how I can copy only files, but not subfolders.

The SFTP folder /outbound contains csv files and other subfolders like edi, test, debug.

The CSV files are placed daily and these folders also get updated daily.

Please let me know how I can copy only the .csv files (I tried options but was not successfully).


回答1:


See How do I transfer directory non-recursively?

So in your case, you add |*/ to your existing file mask:

get -filemask=">=%TIMESTAMP#yyyy-mm-dd% | */" /outbound \\sharedrive\Copiedfiles


来源:https://stackoverflow.com/questions/53453369/avoid-downloading-subfolders-with-winscp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!