Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
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)

Options

Topic review

m-sonawane@eisai.co.in

I got the issue, I have resolved now.
Thank you for your support.
m-sonawane@eisai.co.in

@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\IP address\usr\sftpuser\DSU\DATA\OUT" ^
"cd /Einvoice" ^
"put *.* " ^
"exit"
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0
(
echo Success
)
else
(
echo Error
)
 
exit /b %WINSCP_RESULT%

Above is the script and the attached is the error.
I am not able to find the logs on the mentioned address C:\Program Files (x86)\WinSCP\logs\AutoTransfer.log
m-sonawane@eisai.co.in

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..
@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%

Please help