Sync 1:1

Advertisement

TheNick
Guest

Sync 1:1

Hi,
I have this script to send files either from SFTP to Local PC or vice versa. I want to achieve if I add new files to local folder and delete some old ones in that folder to sync with remote folder in 1:1 manner.
open sftp://username:password@122.27.38.5:5022 -hostkey="xxxxx"
option confirm off
option batch continue
synchronize remote C:\Users\userx\Desktop\S /home/shared/userx/S
synchronize local C:\Users\userx\Desktop\R /home/shared/userx/R
synchronize remote C:\Users\userx\Desktop\R1 /home/shared/userx/R1 
synchronize local C:\Users\userx\Desktop\R2 /home/shared/userx/R2
Thanks for the help!

Reply with quote

Advertisement

TheNick
Guest

Sync 1:1

synchronize remote -delete C:\Users\userx\Desktop\S /home/shared/userx/S
synchronize local -delete C:\Users\userx\Desktop\R /home/shared/userx/R
synchronize remote -delete C:\Users\userx\Desktop\R1 /home/shared/userx/R1
synchronize local -delete C:\Users\userx\Desktop\R2 /home/shared/userx/R2
Seems like this does the job.

Reply with quote

Advertisement

You can post new topics in this forum