Not able to transfer file automatically with batch file script
Hello,
I am not able to transfer file with batch file script.
Attached is the result. Files are not transferring to the SFTP server after successful connection. Session is closing after active connection.
Script is mentioned below..
Please help
I am not able to transfer file with batch file script.
Attached is the result. Files are not transferring to the SFTP server after successful connection. Session is closing after active connection.
Script is mentioned below..
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\Program Files (x86)\WinSCP\logs\AutoTransfer.log" /ini=nul ^ /command ^ "open sftp://serverdetails:50022/ -hostkey=""ssh-rsa 2048 *******************""" ^ "lcd E:\TitanSFTP\Data\server ip address\usr\sftpuser\DSU\DATA\OUT" ^ "cd /EInvoice" ^ "put -rawtransfersettings[1] FileNameCase=0 *.* " ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%