Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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.
sergio_sark

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\*"
martin

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.
sergio_sark

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.