WinSCP select most recent file

跟風遠走 提交于 2019-11-28 05:56:06

问题


Looking for the WinSCP command line equivalent of selecting the most recent/latest file. Any ideas

http://winscp.net/eng/docs/script_download_most_recent_file


回答1:


Use the -latest switch of the get command, as the Downloading the most recent file article shows:

get -latest /home/user/* c:\downloaded\

If you want to use it on command-line, the syntax is like:

winscp.com /command "open sftp://user:password@example.com/ -hostkey=""ssh-rsa 2048 xx:xx:xx...""" "get -latest /home/user/* c:\downloaded\" "exit"

Use WinSCP GUI to generate command-line template for you.



来源:https://stackoverflow.com/questions/22388746/winscp-select-most-recent-file

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