I have a similar issue. My script logs in but will not synch the directories?
Here is what I have so far as my script.
#Building A Report Move Script
#Open Session
@echo on
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
/command ^
"open sftp://SBCadmin:[email protected]/ -hostkey=""ssh-ed25519 255 otNIccAuAOKu5/+6IGTXGzcuIcw4Kf1PO/OJA7OLUWI""" ^
"synchronize local "D:\SFTPRoot\BldgA" "/home/niagara/stations/LincolnPlaza_Bldg_A/shared/AutoCx"" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%
Any ideas with the synch line?
Thanks....