Automatic Script to Synchronize remote directory to local directory
I'm having trouble getting a batch script to work for the
Here is my .bat script:
When I check the logs, it logs in via FTP just fine, however the
I have tried double quotes, single quotes, removing the
synchronize
command.
Here is my .bat script:
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\winscplog\WinSCP.log" /ini=nul ^ /command ^ "open ftp://xxxx:xxxx@10.x.x.x/" ^ # Synchronize Remote to Local d:\ "synchronize local -delete // D:\ftproot\SysExpDat\CDR /SysExpDat/CDR" ^ # Disconnect "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%
synchronize
command is failing with the following error:
2022-01-14 10:04:30.767 Script: Missing parameter for command 'synchronize'.
//
, and same error in all instances.