Issue with Synchronize Command
Hi all, Firstly I am a bit of a noob so sorry if this is an easy solve. I have just setup a FTP server on a tablet in my warehouse and I wanted to sync the pictures to a folder on my desktop.
I tested this using the below on my own PC:-
This works a treat and very reliable. However when I move the same to the other PC I am getting the below on the log:-
I have tried making the
Can anybody help? Also it would be nice if this script could loop itself continuosly if anybody can post some ideas it would be appreciated.
I tested this using the below on my own PC:-
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\Users\james.QUINTA\Desktop\WinSCP.log" /ini=nul ^ /command ^ "open ftp://anonymous:anonymous%%40example.com@10.0.0.65:2221/" ^ "lcd C:\Users\james.QUINTA\Desktop\Pictures" ^ "cd /DCIM/Camera" ^ "synchronize local" ^ "exit" ^ set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%
. 2022-06-23 10:17:02.234 Using FTP protocol. . 2022-06-23 10:17:02.234 Doing startup conversation with host. < 2022-06-23 10:17:02.235 Script: Starting the session... > 2022-06-23 10:17:02.235 PWD < 2022-06-23 10:17:02.239 257 "/" is current directory. . 2022-06-23 10:17:02.239 Getting current directory name. . 2022-06-23 10:17:02.239 Startup conversation with host finished. < 2022-06-23 10:17:02.239 Script: Session started. < 2022-06-23 10:17:02.240 Script: Active session: [1] anonymous@10.0.0.65 > 2022-06-23 10:17:02.241 Script: lcd C:\Users\warehouse\OneDrive\Desktop\Pictures < 2022-06-23 10:17:02.241 Script: C:\Users\warehouse\OneDrive\Desktop\Pictures > 2022-06-23 10:17:02.243 Script: cd /DCIM/Camera . 2022-06-23 10:17:02.243 Changing directory to "/DCIM/Camera". > 2022-06-23 10:17:02.243 CWD /DCIM/Camera < 2022-06-23 10:17:02.247 250 Directory changed to /DCIM/Camera . 2022-06-23 10:17:02.247 Getting current directory name. > 2022-06-23 10:17:02.248 PWD < 2022-06-23 10:17:02.251 257 "/DCIM/Camera" is current directory. < 2022-06-23 10:17:02.251 Script: /DCIM/Camera > 2022-06-23 10:17:02.252 Script: Sychronize local < 2022-06-23 10:17:02.253 Script: Unknown command 'Sychronize'. . 2022-06-23 10:17:02.253 Script: Failed . 2022-06-23 10:17:02.253 Script: Exit code: 1 . 2022-06-23 10:17:02.260 Disconnected from server
S
a small s
but this has not affect whatsoever,
Can anybody help? Also it would be nice if this script could loop itself continuosly if anybody can post some ideas it would be appreciated.