Ahh, sweet. it's working now. Thanks Martin!
- jrp78
^
at the end of the line with the first synchronize
command. This effectively makes the ^
be ignored (it escapes the space, not the newline).
@echo off
SET TIMESTAMP=log_%DATE:~-4%_%DATE:~4,2%_%DATE:~7,2%_%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%.log
"D:\scripts\WinSCP-5.13-Portable\WinSCP.com" ^
/log="D:\transfer_logs\%timestamp%" /loglevel=0 /ini=nul ^
/command ^
"open ftpes://user:pass@X.X.X.X:xx/ -certificate=""xx:xx:xx:xx:xx:xx:xx""" ^
"option batch continue" ^
"option transfer binary" ^
"option synchdelete on" ^
"synchronize local d:\inetpub\folder1\ /folder1/ -delete -criteria=either -filemask=""| thumbs.db; ~*.*""" ^
"synchronize local d:\folder2\ /folder2/ -delete -criteria=either -filemask=""| thumbs.db; ~*.*""" EXIT
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%