Script continually downloads directories - need help

Advertisement

tiwas
Joined:
Posts:
10

Script continually downloads directories - need help

Hi,
I've set up a script to synchronize a remote directory via SFTP. Things seemed fine until I added a directory to the mix. If I delete the local directory, the script will re-download it - which is not the intended behavior.

I would appreciate it if someone could have a look and suggest what needs to be changed.

Intended behavior: Copy everything from the remote directory into the local. If the local is deleted, it should not be re-downloaded. If the remote is deleted I really don't care if the local is deleted or not.

option batch abort
option confirm off
open sftp://user:password@host:port -hostkey="ssh-ed25519 255 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
synchronize local \\ip\share\dir1\dir2 /path/to/remote/files
exit

Thanks!

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum