Automating FTP Transfer not working

Advertisement

rhysparryfcc
Joined:
Posts:
1
Location:
UK

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\WinSCP.com" ^
  /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
 
    "exit"
 
set WINSCP_RESULT=%ERRORLEVEL%
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.

Regards,
Rhys

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum