使用CMD从SFTP复制文件 [英] Copy files from SFTP with CMD

查看:223
本文介绍了使用CMD从SFTP复制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用SFTP站点的客户,我想使用任何自动过程从特定文件夹中复制文件.

We have a customer with their SFTP site, and I would like to copy files from specific folder, by using any automated process.

我发现的一个示例是 winscp.net ,但是出于我的目的,我还没有设法使用它. http://www.itworld.com/article/2928599/windows/how-to-automate-sftp-file-transfers-in-microsoft-windows.html

One of the example which I found, is winscp.net, but I have not managed how to use it, for my purpose. http://www.itworld.com/article/2928599/windows/how-to-automate-sftp-file-transfers-in-microsoft-windows.html

问题::我只需要运行脚本,而无需将文件从其目录复制到我的本地文件夹中.可能吗?

QUESTION: All I will need is not run script and the file should be copied from their directory to my local folder. Is it possible at all?

我找到了使用PSFTP(Putty)连接到服务器的方法,但是如何自动创建它,不知道.

I found the way of using PSFTP(Putty) to connect to the server, but how to make it automatically, do not know.

推荐答案

我认为这是解决您的问题的好方法.

I think its a good solution for your problem.

您必须安装winscp并编写一些文件的代码,它将自动执行.我用过3或4次.另外,您还需要SFTP通过它进行连接的密钥.

You have to install winscp and the code some files and it will do automaticaly. I used 3 or 4 times. Also you need the key for your SFTP to connect throught it.

在此逐步获取指南的链接.

Here a link to the guide step by step.

https://winscp.net/eng/docs/guides

这是脚本网页的链接

https://winscp.net/eng/docs/scripting

我建议您创建一个ini文件来加载ftp连接的所有特征,然后在此文件上执行脚本.

I recommend you to create an ini file to load all of the characteristics of your ftp connection and then execute an script over this.

可以这样启动

WinSCP.com /ini=[your ini file] /script=[Your script file(what you want to do when it is connect)]

希望这会有所帮助!.

这篇关于使用CMD从SFTP复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆