WinSCP batch - file transfer happens sometimes only
>> sftp files from source to destination
>> move files to backup location in source itself
So I have installed WinSCP and its working properly. Based on this I generated the batch script which is also executing without error but file transfer happens sometime only. Surprising GUI is working as expected but this is not, What could be the issue ? Need urgent fix would be much appreciated as nearing delivery deadlines.
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\sftp\logs\sftp_log.log" /ini=nul ^ /command ^ "open sftp://xxxxxxxxx/ -hostkey=""ssh-ed25519 256 d7Te2DHmvBNSWJNBWik2KbDTjmWtYHe2bvXTMM9lVg4=""" ^ "cd /IN" ^ "put *.*" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%