Answer the question
In order to leave comments, you need to log in
WinSCP has an error while syncing files from a script?
Good afternoon!
I want to synchronize the contents of the local and remote directory, which is connected via SFTP using WinSCP.
Created bat:
@echo on
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /script=D:\WinSCP_script.txt /log=D:\winscplog.txt
pause
option batch abort
option confirm off
# Connect
open sftp://user:[email protected]:4286/ -hostkey="ssh-ed25519 255 cB0bHayI/GWWkrmjsVM5Vus1QsyHxVtSEu7MHOMxcIU="
lcd D:\test_sync
cd /work/test_sync
# synchronize files from server
synchronize remote "D:\test_sync" "/work/test_sync"
# Disconnect
close
exit
. ...2020-11-08 18:06:16.003 Local file 'D:\test_sync\1.torrent' [2020-11-08T13:31:43.000Z] [55822] is new
< 2020-11-08 18: 06:16.004 Script: No objects to sync.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question