WinSCP Automated task scheluder to transfer new files

Advertisement

sergio_sark
Joined:
Posts:
6
Location:
SPAIN

WinSCP Automated task scheluder to transfer new files

Hello¡¡¡

I am new in this forum and I want to configure an automated transfer between WinSCP (as SFTP client) and a SSH Server.
I have created a new scheduled task in control panel, following https://winscp.net/eng/docs/guide_schedule

My configuration is:
"C:\Program Files (x86)\WinSCP\WinSCP.exe"
/log=c:\TEST\winscp.log /command "open sftp://USER:TARGET_PC@XX.XX.XXX.XXX/ -hostkey="ecdsa-sha2-nistp384 384 16:ec:53:0c:02:a9:e0:02:25:d3:b3:70:f9:75:53:12"
However, this task does not connect to the server.

Could you support me?

Thanks.
Last edited by sergio_sark on 2017-03-10 09:09; edited 1 time in total

Reply with quote

Advertisement

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

Re: WinSCP Automated task scheluder to transfer new files

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

sergio_sark
Joined:
Posts:
6
Location:
SPAIN

Re: WinSCP Automated task scheluder to transfer new files

Hi Martin,

Thanks for answering. Find attached the log file.

My configuration is:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" 
/console /log=C:\TEST\winscp.log /command "option batch on" "option confirm off" "open sftp://USER:TARGET_PC@XX.XX.XXX.XXX/ -hostkey="ecdsa-sha2-nistp384 384 16:ec:53:0c:02:a9:e0:02:25:d3:b3:70:f9:75:53:12"" "get C:\SFTP Test Folder\*"
Description: log

Reply with quote

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

Re: WinSCP Automated task scheluder to transfer new files

1) You cannot use Windows path to refer to remote files, even if it is a Windows server. The SFTP servers have a virtual directory tree. You have to use paths to that virtual tree. Connect with WinSCP GUI to see that paths the server is using.

2) If the paths contains spaces, you have to enclose the path with double-quotes.
https://winscp.net/eng/docs/commandline#syntax
Though it's likely that the virtual path won't contain spaces.

Reply with quote

Advertisement

You can post new topics in this forum