Post a reply

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)


Topic review


Automating FTP Transfer not working

Hello all,

I am attempting to automate an FTP to another customer of ours so we can use Task Scheduler to run this at a certain time.

We have the following script;
@echo off
"C:\Program Files (x86)\WinSCP\" ^
  /log="C:\WinSCP.log" /ini=nul ^
  /command ^
    "open sftp://username:password@ipaddress/ -hostkey=""ssh-rsa 1024
............................="" -rawsettings ProxyPort=0"
put remote \\current file location /senders location
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
exit /b %WINSCP_RESULT%"

This logs us into winscp for the site but does not automatically send the files which we thought it would using the "put" command. If we manually run the "put" command then the file transfers as required.

Any help in getting the files to transfer automatically would be greatly appreciated.