Post a reply

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

martin

Re: /log path

C:\writable\%TEMP%\to\log\WinSCP.log is hardly a valid path.
Maybe you wanted %TEMP%\WinSCP.log
sony

same error can anybody help me out tooo!!!!

Den1978 wrote:

Hello everyone,
I am trying to set up automated data transfer.
So I get WinSCp generates the code for batch file (the code is below).
But when I create batch file and run it it does nothing.
On the website it says: In the Command-line (and possibly also in the Batch file), you should modify a path to a session log file in the /log switch.
So I put this: /log="C:\writable\%TEMP%\to\log\WinSCP.log" /ini=nul ^ but is still does not work.
Can anybody help me to understand what I am doing wrong?

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
/command ^
"open sftp://denis_lomakin:Babushka%%402128@files.blackbaudhosting.com/ -hostkey=""ssh-rsa 1024 b36bXCOIuJJlXQcAxy3DLz+UYidT6YlmZzqZChwkyUk=""" ^
"cd /6745/Denis" ^
"lcd Q:\testRE" ^
"get ""Constituent Table.CHR""" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%

Thanks
Denis
Den1978

/log path

Hello everyone,
I am trying to set up automated data transfer.
So I get WinSCp generates the code for batch file (the code is below).
But when I create batch file and run it it does nothing.
On the website it says: In the Command-line (and possibly also in the Batch file), you should modify a path to a session log file in the /log switch.
So I put this: /log="C:\writable\%TEMP%\to\log\WinSCP.log" /ini=nul ^ but is still does not work.
Can anybody help me to understand what I am doing wrong?

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
/command ^
"open sftp://denis_lomakin:Babushka%%402128@files.blackbaudhosting.com/ -hostkey=""ssh-rsa 1024 b36bXCOIuJJlXQcAxy3DLz+UYidT6YlmZzqZChwkyUk=""" ^
"cd /6745/Denis" ^
"lcd Q:\testRE" ^
"get ""Constituent Table.CHR""" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%

Thanks
Denis