Manual transfer fine but script not working
Hi,
I have quite a few scripts that follow this batch script syntax and format and they all work fine. There is one that isn't working (different SFTP location) when using a script but when using the GUI, I'm able to download files from the SFTP.
The script is
When I try running this I get this and then it sticks:
I have quite a few scripts that follow this batch script syntax and format and they all work fine. There is one that isn't working (different SFTP location) when using a script but when using the GUI, I'm able to download files from the SFTP.
The script is
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\FTP\WinSCP.log" /ini=nul /loglevel=2* ^ /command ^ "open sftp://UserName:Password@sftp.clientname.co.za/ -hostkey=""ssh-rsa 1024 7UI9GKZvOKnqKO3K21hvtyx4a8s2gxH7D8RrNeWJN38="" -rawsettings FSProtocol=2 ProxyPort=0" ^ "cd /" ^ "lcd C:\FTP\Files\ClientName" ^ "synchronize local -filemask=*.*>1DS" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%
I've attached the log resultsSearching for host...
Connecting to host...
Authenticating...
Using username "UserName".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] UserName@sftp.ClientName.co.za
winscp>