Automated download but skip existing files

Advertisement

JanneFiH
Guest

Automated download but skip existing files

Hi,
I apologize if this topic has been added before, but I tried finding any other thread with the same problem as me, but failed.
I'm trying to connect through FTP and download an entire library, but skip already existing files. The problem is that it overwrites them instead.

Can anyone be so kind to point out the error I'm doing?

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log="F:\log\WinSCP.log" /ini=nul ^
  /command ^
    "open ftp://user:password@ip:21/ -passive=0" ^
    "cd /Docs" ^
    "lcd Z:\Docs" ^
    "get *" ^
    "exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
  echo Success
) else (
  echo Error
)

exit /b %WINSCP_RESULT%

Thank you in advance!

Janne

Reply with quote

Advertisement

You can post new topics in this forum