Copy files from SFTP with CMD

2019-09-23 01:45发布

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

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?

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

1条回答
做自己的国王
2楼-- · 2019-09-23 02:17

I think its a good solution for your problem.

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

Here is a link to the scripting webpage

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

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.

It can be launched like that

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

Hope this helps!.

查看更多
登录 后发表回答