This is what I did:
1. Get connected with the server
2. Go to Session, click on Generate Session URL/Code
3. Under the Script tab, select Batch file as the Format, save it to autosync.bat
4. Using a text editor, replace "Your command 1" with:
"synchronize local \Temp /Distribution/Comp1"
run the bat
Nothing copied to a new empty folder C:\Temp
From the log I can see the connection was set up and the directory was pull out. The last a few lines are:
. 2016-11-14 14:02:52.884 Startup conversation with host finished.
. 2016-11-14 14:03:22.525 Sending dummy command to keep session alive.
> 2016-11-14 14:03:22.525 PWD
< 2016-11-14 14:03:22.525 257 "/Distribution/Comp" is current directory
. 2016-11-14 14:03:51.820 Disconnected from server
My script ends up as below:
@echo off "C:\WinSCP\WinSCP.com" ^ /log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^ /command ^ "open ftpes://ftpuser:email@example.com/" ^ "synchronize remote \Temp /Distribution/Comp" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%
Can anyone help me to fix it please? Thank you very much.