Sample Script to send files using SFTP WINSCP

Advertisement

vk.kumar
Joined:
Posts:
4
Location:
INDIA

Sample Script to send files using SFTP WINSCP

Hi All,

Iam new to scripting. My requirement is as below:

Poll the files from a particular location and send to target location using SFTP (WINSCP).
Guide me writing a script for this requirement.

Thanks in Advance.
Krishna

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Sample Script to send files using SFTP WINSCP

What specific problem are you having with the task? Where are you polling the files from? A local or remote location?

Reply with quote

vk.kumar
Joined:
Posts:
4
Location:
INDIA

1. Files will be polled from local machine.
2. I need to transfer multiple files from local machine to remote SFTP location.

Could you provide sample script for the above requirement.

Reply with quote

vk.kumar
Joined:
Posts:
4
Location:
INDIA

Thanks for the update.

what should be given in the hostkey value.

open sftp://user:password@example.com/ -hostkey=""

Reply with quote

Advertisement

Hema
Guest

Navigation to find -host key fingerprint

If you are using 5.7.2. version, click 'Session' tab in the Menu, then click 'Server/Protocol Information'. 'Server host key fingerprint' can be seen at the bottom of the 'Protocol' screen.

Reply with quote

vk.kumar
Joined:
Posts:
4
Location:
INDIA

thanks for update.

we are using WINSCP 4.3.2 version. I couldn't able to find the option which you were telling.


open sftp://user:password@example.com/ -hostkey=""

do we need to give the private key in the hostkey value??.


Regards,
Kumar

Reply with quote

Advertisement

You can post new topics in this forum