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: Zero byte files downloaded

Please post log files for all three scenarios.
m44

Zero byte files downloaded

Hello,
I am facing an issue where WinSCP downloads same file correct (200B) to dir_1 and some times downloads zero byte file to dir_2. Some time in dir_2 download is correct and in dir1 file is zero byte.

set timestamp=%DATE:/=-%_%TIME::=-%
set timestamp=%timestamp: =%
 
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="C:\Users\some_dir\%timestamp%.log" /ini=nul ^
  /command ^
    "open ftp://user:password@some.host.com/" ^
    "get -transfer=automatic *.txt<1N>1 c:\some_dir_1\" ^   
    "get -delete -transfer=automatic *.txt<1N>1 c:\some_dir_2\" ^
    "exit"
 
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)
 
exit /b %WINSCP_RESULT%