Zero byte files downloaded

Advertisement

m44
Joined:
Posts:
1

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%

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum